Hi folks!
I need to check the authorized users against one or more Active Directory groups. If the user is not a member, I need to unauthenticate the user.
How should I do that?
I was thinking of subscribing to the Authenticate event of WindowsAuthenticationModule in Global.asax, but that doesn't work. Is there some similar way of doing this?
protected void WindowsAuthentication_OnAuthenticate(object sender, WindowsAuthenticationEventArgs args)
{
if (!User.IsInRole(@"DOMAIN\SomeGroup"))
{
args.User.Identity.IsAuthenticated = false;
}
}
...
Go to the complete details ...