0
トークンエンドポイントから認証コードフローを介して "access_token"と "id_token"を取得したいと考えています。しかし、郵便配達員の次のパラメータでトークンエンドポイントを呼び出す際に、「invalid_grant」エラーが発生します。IdentityServer4のTokenEndpointからauthorization_codeを介してid_tokenを取得する方法は?
POST /connect/token HTTP/1.1
Host: localhost:2000
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Postman-Token: a8a29659-0ea3-e7dc-3bd6-6e6630a7370d
client_id=client
&client_secret=client
&grant_type=authorization_code
&username=admin
&password=admin
&scope=openid+profile
クライアント設定:
new Client
{
ClientId = "client",
ClientSecrets =
{
new Secret("client".Sha256())
},
AllowedGrantTypes = new List<string> { OidcConstants.GrantTypes.AuthorizationCode },
AllowedScopes = {
StandardScopes.OpenId.Name,
StandardScopes.Profile.Name,
}
}
私のクライアントの構成セクションで間違っていますか?そして、どのように私はトークンエンドポイントへのポストリクエストを成功させるのですか?