GET auth/oidc/authenticate

Retrieve an ID token for the given user, destined for the given identity consumer. This is part of our OpenID Connect 1.0 provider implementation.

For example, the forums authentication workflow goes like this:

  1. The user clicks the forum login button.
  2. The forum forwards the user to the OpenID endpoint, where
  3. the user is allowed to log in (or was already), and
  4. this API method is called to get an ID token.
  5. The token is forwarded back to the forum as a parameter to the redirect URL,
  6. and the forum reads and validates the ID token before using it as sufficient credentials to log in the user.

Example

GET /api/v1/auth/oidc/authenticate HTTP/1.1
  ?aud=https://community.theendlessmission.com
  &redirectUrl=https://community.theendlessmission.com/auth/oidc/callback
  &nonce=123456789

----------------------------------------
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
ETag: ...

{
  "idToken": "eyJ...uwQ",
  "redirectUrl": "https://community.theendlessmission.com/auth/oidc/callback",
  "expiresIn": 600
}

Security

Authentication is required for this method, but any user is permitted.

URL Parameters

NONE

Query Parameters

NameDescriptionValue
audthe identity consumer that we are logging into; included to validate the client against accepted consumersstring
redirectUrlthe return target; included to validate the return against accepted consumersstring
noncea nonce value to include in the resulting token optionalstring

Request Body

NONE

Response

Successful responses are code 200 with data in the response body. Error responses are standard.

Response Body

NameDescriptionValue
idTokenthe generated ID token to forward to the consumerstring
redirectUrlthe valid redirect URLstring
expiresInthe amount of time until the given ID token expires, in secondsnumber