ClaimsAuthenticationManager is not invoked ClaimsAuthenticationManager is not invoked asp.net asp.net

ClaimsAuthenticationManager is not invoked


In the system.webserver part of your web.config do you have the ClaimsAuthorizationModule set,

eg

<add name="ClaimsAuthorizationModule" type="Microsoft.IdentityModel.Web.ClaimsAuthorizationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />


For .NET 4.5 you have to add this:

<add name="ClaimsAuthorizationModule" type="System.IdentityModel.Services.ClaimsAuthorizationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />


ClaimsAuthenticationManager is not invoked automatically. One needs a plumbing code for that unless they are using WS-Federation.

You can do it in an PostAuthenticateRequest event handler for the HttpApplication.

A good example is located in the http://github.com/thinktecture/Thinktecture.IdentityModel.45 project. Search for ClaimsAuthenticationHttpModule.cs which invokes it.