Herald
OpenapiOauth

Handle OAuth callback from provider for a realm

GET
/api/oauth/{realmId}/{provider}/callback

Path Parameters

realmId*string

Realm ID

provider*string

OAuth provider type

Query Parameters

code?string

Authorization code from provider (absent when the user denied authorization)

state?string

State token for CSRF protection

error?string

Provider error code (e.g. access_denied) when authorization was denied

error_description?string

Human-readable provider error description

Response Body

OAuth login successful (or, with error=..., a friendly denial body)

application/json
  1. response
agreements?array<>|null
consentRequired?boolean|null
message*string
restrictedSession?null|
userId*string
accessToken*string
expiresIn*integer
Formatint64
Range0 <= value
refreshExpiresIn*integer
Formatint64
Range0 <= value
refreshToken*string
tokenType*string
Example Request
curl -X GET 'https://example.com/api/oauth/string/string/callback'
Example Response
{
  "agreements": [
    {
      "agreement_type": "string",
      "effective_at": "2019-08-24T14:15:22Z",
      "external_url": "string",
      "mode": "full_text",
      "summary": "string",
      "title": "string",
      "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
      "version_no": 0
    }
  ],
  "consentRequired": true,
  "message": "string",
  "restrictedSession": null,
  "userId": "string"
}