我正在尝试使用Katana中间件实现Quickbooks SSO提供程序。
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions...
...
SignInAsAuthenticationType = signInAsType,//"idsrv.external"
...
作为回应,我得到了对IS3的回调:http://localhost:44333/callback?state= ...... ..它说错误:“没有通过身份证明”
我是否需要在OpenIdConnectAuthentication.Notifications中处理它,或者可能覆盖OpenIdConnectAuthenticationHandler中的内容
先感谢您。-)
一些代码:
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
ClientId = IntuitClientId,
Authority = "Quickbooks",
MetadataAddress = "https://developer.intuit.com/.well-known/openid_sandbox_configuration/",
RedirectUri = "https://localhost:44333/callback",
CallbackPath = new PathString("/callback"),
ClientSecret = IntuitClientSecret,
ResponseType = "code",//code only for Intuit
Scope = "com.intuit.quickbooks.accounting",
我已将IdentityServer3源连接到调试,它不能从中间件“登录”,这里:
public static async Task<string> GetSignInIdFromExternalProvider(...
{
...
var result = await context.GetAuthenticationFrom(Constants.ExternalAuthenticationType);
...
result.Properties.Dictionary.TryGetValue(Constants.Authentication.SigninId, out val))
...
}
和
public static async Task<Microsoft.Owin.Security.AuthenticateResult> GetAuthenticationFrom(this IOwinContext context, string authenticationType)
{
...
return await context.Authentication.AuthenticateAsync(authenticationType);
}