开发者

urlauthorization with custom roleprovider

I am interacting with a third 开发者_如何学运维party httpmodule for authentication. I implemented my custom roleprovider to interact with that. However they use a CustomPrincipal instead of the expected RolePrincipal for urlauthorization.

In which event in global.asax can I hook to grab the customprincipal, instantiate a new RolePrincipal and copy over the custom Identity implementation they provide?


you need to use Application_AuthenticateRequest event

protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
    if (HttpContext.Current.User != null)
    {
        if (HttpContext.Current.User.Identity.IsAuthenticated)
        { 
        }
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜