2017-12-19 17 views
0

トークンを発行するためのアイデンティティ・サーバーを作成しました。 identityserver3を使用して設定する。 トークンに署名するためのパスワードを持つローカルの.pfx証明書を使用しています。Identityserver3エラーhttps:// localhost:44300/identity /。well-known/openid-configuration

これはうまくいきましたが、なぜ添付ファイルに示されているように次のエラーが表示されるのかわかりません。

本当に私を狂っています。

以下は、認証サーバー上のstartup.csのコードです。証明書ファイルは、\ bin \ debugフォルダ

public class X509Certificate2Wrapper : IX509Certificate2Wrapper 
{ 
    public X509Certificate2 LoadCertificate(string filename, string password) 
    { 
     var path = [email protected]"{AppDomain.CurrentDomain.BaseDirectory}{filename}"; 

     return new X509Certificate2(path, password); 
    } 
} 

    app.Map("/identity", idsrvApp => 
    { 
     idsrvApp.UseIdentityServer(new IdentityServerOptions 
     { 
      SiteName = "Identity Manager", 
      IssuerUri = Common.Constants.IdSrvIssuerUri, 
      SigningCertificate = X509Certificate2Wrapper.LoadCertificate(CertificateFilename, CertificatePassword), 
      Factory = factory, 
      RequireSsl = true, 
      EnableWelcomePage = false, 
      AuthenticationOptions = new AuthenticationOptions 
      { 
       EnableSignOutPrompt = false, 
       EnablePostSignOutAutoRedirect = true, 
       PostSignOutAutoRedirectDelay = 3, 
       CookieOptions = new IdentityServer3.Core.Configuration.CookieOptions 
       { 
        ExpireTimeSpan = new TimeSpan(0, IdentityServerServices.AuthenticationTimeout(), 0), 
        SlidingExpiration = true 
       }, 
       // 
       // Note: Uncomment following line to enable WindowsAuthentication only - logout related settings will also require removal! 
       // 
       //EnableLocalLogin = false, 
       IdentityProviders = ConfigureIdentityProviders 
      }, 
      Endpoints = new EndpointOptions 
      { 
       EnableAccessTokenValidationEndpoint = true, 
       EnableAuthorizeEndpoint = true, 
       EnableCheckSessionEndpoint = false, 
       EnableClientPermissionsEndpoint = false, 
       EnableCspReportEndpoint = false, 
       EnableDiscoveryEndpoint = true, 
       EnableEndSessionEndpoint = true, 
       EnableIdentityTokenValidationEndpoint = true, 
       EnableIntrospectionEndpoint = false, 
       EnableTokenEndpoint = true, 
       EnableTokenRevocationEndpoint = false, 
       EnableUserInfoEndpoint = true 
      } 
     }); 
    }); 

enter image description here

答えて

0

ない、これは完璧な答えであることを確認しに位置しています。しかし、私は以下のことをしてくれました。

私は)私は信頼されたルート証明機関に個人のCertStoreから「localhost」をIIS Expressの証明書を移動し、これを解決するにはhttps://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/Certificates

II)で述べたcertificatesasに関する手順に従い、問題が消えていました。