/oauth2

Lists all auth schemes in the system

get

Requires SUPERUSER access. Gets a pagination of Auth Schemes for the given query.

Authorizations
AuthorizationstringRequired
Query parameters
offsetanyOptionalDefault: 0
countanyOptionalDefault: 20
tagsanyOptional
Responses
get
/auth_scheme/oauth2
GET /api/rest/auth_scheme/oauth2 HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Creates a new Auth Scheme

post

Creates a new Auth Scheme, from the data in the given auth scheme request

Authorizations
AuthorizationstringRequired
Body

Represents a request to update an Auth Scheme for an Application.

idanyRequired

The unique ID of the auth scheme.

nameanyRequired

A unique name used to identify the scheme within the instance of Elements. If using the same OAuth2 provider (e.g. Steam), it is recommended to suffix the name for each application when using multitenancy, e.g. steam_game1, steam_game2, etc.

validationUrlanyRequired

The URL to send the user token validation request to.

headersanyOptional

The headers required for the validation request.

paramsanyOptional

The query parameters required for the validation request.

responseIdMappinganyOptional

Determines how to map the user id in the response. For example "response.params.steamid"

Responses
post
/auth_scheme/oauth2
POST /api/rest/auth_scheme/oauth2 HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 180

{
  "id": null,
  "name": null,
  "validationUrl": null,
  "headers": [
    {
      "key": null,
      "value": null,
      "fromClient": null
    }
  ],
  "params": [
    {
      "key": null,
      "value": null,
      "fromClient": null
    }
  ],
  "responseIdMapping": null
}
{
  "code": "text",
  "message": "text"
}

Gets a specific Auth Scheme

get

Gets a specific Auth Scheme by the oAuth2AuthSchemeId.

Authorizations
AuthorizationstringRequired
Path parameters
oAuth2AuthSchemeIdanyRequired
Responses
get
/auth_scheme/oauth2/{oAuth2AuthSchemeId}
GET /api/rest/auth_scheme/oauth2/{oAuth2AuthSchemeId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Updates an Auth Scheme

put

Updates an Auth Scheme with the specified data in the auth scheme request.

Authorizations
AuthorizationstringRequired
Path parameters
oAuth2AuthSchemeIdanyRequired
Body

Represents a request to update an Auth Scheme for an Application.

idanyRequired

The unique ID of the auth scheme.

nameanyRequired

A unique name used to identify the scheme within the instance of Elements. If using the same OAuth2 provider (e.g. Steam), it is recommended to suffix the name for each application when using multitenancy, e.g. steam_game1, steam_game2, etc.

validationUrlanyRequired

The URL to send the user token validation request to.

headersanyOptional

The headers required for the validation request.

paramsanyOptional

The query parameters required for the validation request.

responseIdMappinganyOptional

Determines how to map the user id in the response. For example "response.params.steamid"

Responses
put
/auth_scheme/oauth2/{oAuth2AuthSchemeId}
PUT /api/rest/auth_scheme/oauth2/{oAuth2AuthSchemeId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 180

{
  "id": null,
  "name": null,
  "validationUrl": null,
  "headers": [
    {
      "key": null,
      "value": null,
      "fromClient": null
    }
  ],
  "params": [
    {
      "key": null,
      "value": null,
      "fromClient": null
    }
  ],
  "responseIdMapping": null
}
{
  "code": "text",
  "message": "text"
}

Deletes an Auth Scheme

delete

Deletes an Auth Scheme with the specified id.

Authorizations
AuthorizationstringRequired
Path parameters
oAuth2AuthSchemeIdanyRequired
Responses
delete
/auth_scheme/oauth2/{oAuth2AuthSchemeId}
DELETE /api/rest/auth_scheme/oauth2/{oAuth2AuthSchemeId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Last updated