Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AuthModule : IHttpModule
- {
- public void Init(HttpApplication context)
- {
- context.AuthenticateRequest += OnAuthenticateRequest;
- context.AuthorizeRequest += OnAuthorizeRequest;
- }
- private static void OnAuthenticateRequest(object sender, EventArgs e)
- {
- // authenticate the user here...
- // (note that the sender argument is an HttpApplication instance)
- }
- private static void OnAuthorizeRequest(object sender, EventArgs e)
- {
- // ...then authorize their attempted action here, if needed
- }
- }
Add Comment
Please, Sign In to add comment