2016-08-02 3 views
0

인증에 IdentityServer3을 사용하도록 클라이언트 응용 프로그램 port3g를 설정 중입니다.Identityserver3 - 클라이언트 응용 프로그램을 알 수 없거나 인증되지 않았습니다.

오류가 발생합니다. 클라이언트 응용 프로그램을 알 수 없거나 권한이 없습니다. 클라이언트와 OAuth 서버 클라이언트 설정이 올바르게 구성되어 있다고 생각합니다. PORT3G 시작 프로그램 ..

public void ConfigureAuth(IAppBuilder app) 
    { 
     JwtSecurityTokenHandler.InboundClaimTypeMap = new Dictionary<string, string>(); 

     app.UseCookieAuthentication(new CookieAuthenticationOptions 
     { 
      AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie 
     }); 
     //port3g_implicit 


     app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions 
     { 
      ClientId = "port3g_implicit", 
      Authority = "http://localhost:22710", // Authorization Server 
      RedirectUri = "http://localhost:28037/", // Address of this website 
      ResponseType = "id_token token ", // Added token was not in orginal code 
      Scope = "openid profile offline_access read appRoles", 
      PostLogoutRedirectUri = "http://localhost:28037", 
      SignInAsAuthenticationType = DefaultAuthenticationTypes.ApplicationCookie 
     }); 

    } 

사이트 : 사람이 구성으로

사이트를 오류를 볼 수 있습니까

// BEGIN PORT3G 
      new Client 
      { 
       ClientId = "port3g_implicit", 
       ClientSecrets = new List<Secret> 
       { 
        new Secret("secret".Sha256()) 
       }, 
       ClientName = "Port3G", 
       Flow = Flows.Implicit, 
       AllowedScopes = new List<string> 
       { 
        Constants.StandardScopes.OpenId, 
        Constants.StandardScopes.Profile,Constants.StandardScopes.AllClaims , 
        "read","appRoles" 
       }, 
       RedirectUris = new List<string> 
       { 
        "http://localhost:28037/", 
        "http://localhost:28037/" 
       }, 
       PostLogoutRedirectUris = new List<string> 
       { 
        "http://localhost:28037/" 
       }, 
       Enabled = true 
      } 
      // END PORT3G 

답변

0

ResponseType = "id_token token ", // Added token was not in orginal code 

제거하고 시도하십시오. offline_access 범위도 삭제하십시오

3

당신이 IdentityServer logging 켰습니까 Webhost.OAuth? 이러한 종류의 문제를 진단하는 데 엄청난 도움이 될 수 있습니다.

이 특정 경우에는 암시 적 플로우에서 허용되지 않는 offline_access를 요청할 가능성이 높습니다. 범위에 할당 된 문자열에서 해당 식별자를 제거하십시오. 허용되지

[오류] 요청 범위 : 당신이 로그온 좌회전 할 때, 당신은 아마이 문제를 나타내는 다음 줄이 표시됩니다 "offline_access"응답 유형의 끝에 공백이 있습니다

관련 문제