.NET 4.6下ASP.NET MVC应用OAuth迁移至Azure OpenID Connect认证
当前OAuth配置及遇到的问题
应用配置代码
OAuthOptions = new OAuthAuthorizationServerOptions { ApplicationCanDisplayErrors = true, AuthorizeEndpointPath = new PathString("/Auth/Authorize"), TokenEndpointPath = new PathString("/Auth/Token"), AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(20), AccessTokenProvider = jwtProvider, Provider = new ApplicationOAuthProvider(PublicClientId) }; BearerOptions = new OAuthBearerAuthenticationOptions { AuthenticationType = OAuthDefaults.AuthenticationType, AuthenticationMode = AuthenticationMode.Active, AccessTokenProvider = jwtProvider }; app.UseOAuthAuthorizationServer(OAuthOptions); app.UseOAuthBearerAuthentication(BearerOptions);
查阅了一些论坛资料,但大多针对.NET Core;尝试通过Visual Studio连接服务创建默认应用,却未达到预期效果。
内容的提问来源于stack exchange,提问作者Siva Satya
相关产品推荐
相关产品推荐

