We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authorization Endpoint で認可した後、リソース所有者は認可サーバ (Authorization Server) から「認可しました~」という証である Authorization Grant を受け取り、認可したサービス (Client) に渡しに行きます。 その証を受け取ると、サービスは認可サーバとやり取りをして、リソース所有者の情報を取得するための "鍵" (Token) を取得します。 その Token を取得するためのエンドポイントが、 Token Endpoint と呼ばれるものです。
/oauth/access-token
405 Method not allowed
client_id
client_secret
grant_type
code
redirect_uri
すべて String です
上から順に行うことを想定しています
Authorization
401 Unauthorized
WWW-Authenticate
{ "error": "invalid_request" }
{ "error": "invalid_client" }
authorization_code
{ "error": "unsupported_grant_type" }
code_used
{ "error": "invalid_grant" }
code_expiration
ヘッダには Cache-Control: no-store, Pragma: no-cache を指定する
Cache-Control: no-store
Pragma: no-cache
以下の JSON を返す
{ "access_token": code のレコードに格納されている access_token, "token_type": "bearer", "expires_in": token_expiration までの残り時間 (単位は秒) "scope": token_scope についている scope name の配列 }
The text was updated successfully, but these errors were encountered:
a01sa01to
Successfully merging a pull request may close this issue.
Authorization Endpoint で認可した後、リソース所有者は認可サーバ (Authorization Server) から「認可しました~」という証である Authorization Grant を受け取り、認可したサービス (Client) に渡しに行きます。
その証を受け取ると、サービスは認可サーバとやり取りをして、リソース所有者の情報を取得するための "鍵" (Token) を取得します。
その Token を取得するためのエンドポイントが、 Token Endpoint と呼ばれるものです。
エンドポイントの場所・許可するメソッド
/oauth/access-token
405 Method not allowed
を返す)受け取るパラメータ
client_id
: Requiredclient_secret
: Requiredgrant_type
: Requiredcode
: Requiredredirect_uri
: Optionalすべて String です
チェックすること
上から順に行うことを想定しています
Authorization
ヘッダが含まれている場合401 Unauthorized
を返すWWW-Authenticate
ヘッダを含め、その値は使わせたいAuthorization
ヘッダの値に適応させるredirect_uri
以外のすべてのパラメータが存在し、かつ複数存在しないことを確認する{ "error": "invalid_request" }
と JSON を返す。 Status は 400redirect_uri
が存在するか確認するredirect_uri
が存在する場合は{ "error": "invalid_request" }
[400]redirect_uri
と一致しない場合は{ "error": "invalid_request" }
[400]client_id
,client_secret
のペアが存在するか確認する{ "error": "invalid_client" }
[401]grant_type
がauthorization_code
か確認する{ "error": "unsupported_grant_type" }
[401]code_used
が false か確認する{ "error": "invalid_grant" }
[401] を返し、そのレコードを削除するcode_expiration
が現在時刻より後か確認する{ "error": "invalid_grant" }
[401] を返し、レコードを削除するヘッダには
Cache-Control: no-store
,Pragma: no-cache
を指定する応答
以下の JSON を返す
ヘッダには
Cache-Control: no-store
,Pragma: no-cache
を指定するThe text was updated successfully, but these errors were encountered: