WIF 4.5を使用しているWebAPIアプリケーションでJWT(Json Web Token)をサポートしたいと思っていました。WIF 4.5でJWTSecurityTokenHandlerをサポートする方法はありますか?
私は、JWTSecurityTokenHandler
という古いバージョンのWIFと統合されているようなSystem.IdentityModel.Tokens.Jwt 5.0.0ナゲットパッケージを使用しています。
問題は、ハンドラがを派生し、System.IdentityModel.Tokens.SecurityTokenHandler
からではなく、configセクションが期待していることです。
<system.identityModel>
<identityConfiguration>
<audienceUris>
<add value="http://localhost:49482/" />
</audienceUris>
<securityTokenHandlers>
<add type="System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler, System.IdentityModel.Tokens.Jwt" />
<securityTokenHandlerConfiguration>
<certificateValidation certificateValidationMode="PeerTrust" />
</securityTokenHandlerConfiguration>
</securityTokenHandlers>
</identityConfiguration>
</system.identityModel>
がどのように私はWIF 4.5にJWTをサポートすることができます。
Parser Error Message: ID1029: The custom type is not suitable because it does not extend the correct base class.
CustomType: 'System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler, System.IdentityModel.Tokens.Jwt, Version=5.0.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
BaseClass: 'System.IdentityModel.Tokens.SecurityTokenHandler'
私の設定は次のようになります。
私はそのため理解できる例外を取得しますか?そのためにこのパッケージを使用する方法はありますか?私は何か間違っているのですか?