Hi,
I have created ASP MVC 5 project with ASP Identity bearer token-based authentification and have to add Active Directory (AD) support: if Windows-user belongs concrete group, consider user is authorized without asking login and password (if it possible) otherwise redirect to login page.
I have installed AD FS and have created test console application, it works:
AD FS Token Based Authentication In Code
Also I tried another way to solve my problem.
But on this line:
app.UseWsFederationAuthentication(new WsFederationAuthenticationOptions
I got an exception:
Method not found: 'System.IdentityModel.Tokens.SecurityTokenHandlerCollection Microsoft.IdentityModel.Extensions.SecurityTokenHandlerCollectionExtensions.GetDefaultHandlers(System.String)'. at Microsoft.Owin.Security.WsFederation.WsFederationAuthenticationOptions..ctor(String authenticationType) at Microsoft.Owin.Security.WsFederation.WsFederationAuthenticationOptions..ctor() at TestWsFederationAuth.Web.Startup.ConfigureAuth(IAppBuilder app) in d:\Projects\TestWsFederationAuth\TestWsFederationAuth.Web\App_Start\Startup.Auth.cs:line 30 at TestWsFederationAuth.Web.Startup.Configuration(IAppBuilder app) in d:\Projects\TestWsFederationAuth\TestWsFederationAuth.Web\Startup.cs:line 11
Updating of all nuget packages don't solve my problem.
Can anybody help me?
Thanks.