参照トークンを発行するように IdentityServer3 をセットアップしたので、Web API を呼び出すと、IdentityServer にコールバックして、/sts/connect/accesstokenvalidation でアクセス トークンを検証します。
その呼び出しは、多くの場合、実稼働環境では異常に遅くなる可能性があります - 10 から 20 秒の間です。
トレースの例を次に示します。
w3wp.exe Information: 0 : [Thinktecture.IdentityServer.Core.Endpoints.AccessTokenValidationController]: 5/1/2015 8:29:15 PM +00:00 -- Start access token validation request
w3wp.exe Information: 0 : [Thinktecture.IdentityServer.Core.Validation.TokenValidator]: 5/1/2015 8:29:15 PM +00:00 -- Start access token validation
Debug: [Cache]: 5/1/2015 8:29:25 PM +00:00 -- Cache miss: myApp
Debug: [Cache]: 5/1/2015 8:29:26 PM +00:00 -- Cache hit: myApp
w3wp.exe Information: 0 : [Thinktecture.IdentityServer.Core.Validation.TokenValidator]: 5/1/2015 8:29:26 PM +00:00 -- Token validation success { "ValidateLifetime": true,"AccessTokenType": "Reference","TokenHandle": "ec367c0bee68c8682e000f1526fc7b63"}
w3wp.exe Information: 0 : [Thinktecture.IdentityServer.Core.Endpoints.AccessTokenValidationController]: 5/1/2015 8:29:26 PM +00:00 -- End access token validation request
キャッシュ ヒット/ミス行が疑わしい。
アクセストークンの検証を高速化するために次にどこに行くべきかについてのアイデアはありますか?