이 질문은 실제로 this 내 질문에 대한 연속적인 질문입니다. 인증 코드 흐름을 사용하여 Identityserver4에서 access_token 및 id_token을 가져 오려고합니다.IdentityServer4의 인증 엔드 포인트에서 access_token, id_token을 얻는 방법은 무엇입니까?
그러나 "인증"엔드 포인트에 액세스하려고하면 HTTP 오류 405 (허용되지 않음)가 발생합니다.
HTTP GET 요청
http://localhost:2000/connect/authorize?
client_id=client
&client_secret=secret
&grant_type=authorization_code
&username=admin
&password=admin
&response_type=id_token+token
&scope=openid+profile+offline_access
클라이언트 :
new Client
{
ClientId = "client",
ClientSecrets = { new Secret("secret".Sha256())},
AllowedGrantTypes = new List<string> { "authorization_code" },
AccessTokenType = AccessTokenType.Jwt,
AllowedScopes = { StandardScopes.OpenId.Name, "api1" }
}
사용자 :
new InMemoryUser
{
Subject = "1",
Username = "admin",
Password = "admin"
}
내 질문은, 어떻게 access_token이 얻을 id_token하는 엔드 포인트에 권한을 부여 호출하려면? 내 "클라이언트"및 "사용자"구성의 문제점은 무엇입니까?
로깅을 사용하셨습니까? 그러면 많은 구성 문제를 발견하는 데 도움이됩니다. –