Skip to content

reference:authorization

Axel Boberg edited this page May 24, 2019 · 9 revisions

GET /oauth/authorize

Upon authorization the user-agent should be redirected to this endpoint with the required query parameters.
After successful authentication and authorization the user-agent will be redirected back to the provided redirect_uri.

Query parameters

Name Required  Value
client_id  Yes The id of your registered client
scope  Yes The scopes to request as a string, separated by whitespace
response_type  Yes code
redirect_uri  Yes A registered URI for callback
state  Yes An opaque value to be included in the response for verification

POST /oauth/token

Exchange the retrieved authorization_code for an access_token and a refresh_token.

Headers

Name Required  Value
Content-Type  Yes application/x-www-form-urlencoded

Body

Name Required  Value
code  Yes The retrieved authorization_code
client_id  Yes The client's id
client_secret  Yes The client's secret value
grant_type  Yes The string authorization_code

Example response

{
  "access_token":"1bd253529c832a80cf5c23c8ecbbe7ba8ec05d0a",
  "access_token_expires_at":"2019-05-24T16:24:09.014Z",
  "refresh_token":"2f3c523a845390a20b84513978aa08d4d6c7fae5",
  "refresh_token_expires_at":"2019-05-24T15:24:39.014Z",
  "scope":"openid"
}

Clone this wiki locally