response_type に id_token が含まれている場合の注意点

概要


認可リクエストにおいて、response_type の値として id_token が含まれている場合、scope の値にopenid が指定されていないとエラーとなります。

詳細


Authlete の /auth/authorization API をコールする際、parameters 中の response_type の値として id_token が含まれている場合、 scope の値に openid を含むようにしてください。

scope に openid が含まれていない場合、下記のようなメッセージが認可サーバーあてに返却されます。

 {
  "type": "authorizationResponse",
  "resultCode": "A004302",
  "resultMessage": "[A004302] The value of 'response_type' (id_token) is not allowed when 'scope' does not contain 'openid'.",
  "action": "BAD_REQUEST",
  "client": ...
}


How did we do with this article?