2017-12-15 20 views
2

私は、KatanaミドルウェアでQuickbooks SSOプロバイダを実装しようとしています。OpenIdConnectAuthenticationOptionsを使用してサインインIDが渡されません。IdentityServer3

私はIS3へのコールバックを取得応答として
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions... 
    ... 
    SignInAsAuthenticationType = signInAsType,//"idsrv.external" 
    ... 

http://localhost:44333/callback?state= ...
は、それがエラーについて言う..and:

を "いいえサインインIDが渡されていない" 私はOpenIdConnectAuthenticationでそれを処理する必要がありますか.Notifications、または多分OpenIdConnectAuthenticationHandler

で何かを上書きadvance.-でいただき、ありがとうございます)

答えて

2

いくつかのコード:

app.UseOpenIdConnectAuthentication(新しい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", 
0

私はデバッグに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); 
} 
+0

Katana githubの問題に関するチャット:github.com/aspnet/AspNetKatana/issues/142 – lyolikaa

関連する問題