oauth

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-oauth"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/8adc433f-9c73-4c53-89a3-5483ef4cb94a/social-card.svg?v=3e7ae33eec8b" alt="oauth" width="600" height="315"></a>
POSThttps://lucidace.com/v1/oauth/token

Request body

application/x-www-form-urlencoded

grant_type=authorization_code (code, redirect_uri, code_verifier), refresh_token (refresh_token), urn:ietf:params:oauth:grant-type:device_code (device_code) or urn:ietf:params:oauth:grant-type:jwt-bearer (assertion, project_id, optional scope and resource); client credentials by HTTP Basic or client_id/client_secret

assertionstring
jwt-bearer grant (LC-SEC-28): the ID-JAG identity assertion.
client_idstring
client_secretstring
codestring
code_verifierstring
device_codestring
device_code grant (RFC 8628): the code POST /v1/oauth/device_authorization returned.
grant_typestringrequired
project_idstring
jwt-bearer grant: the project the token is bound to.
redirect_uristring
refresh_tokenstring
resourcestring
jwt-bearer grant: the protected resource (RFC 8707); must be this API.
scopestring
jwt-bearer grant: optional subset of the assertion's scopes (space-separated).
{
  "assertion": "string",
  "client_id": "string",
  "client_secret": "string",
  "code": "string",
  "code_verifier": "string",
  "device_code": "string",
  "grant_type": "string",
  "project_id": "string",
  "redirect_uri": "string",
  "refresh_token": "string",
  "resource": "string",
  "scope": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/oauth/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d '{"assertion":"string","client_id":"string","client_secret":"string","code":"string","code_verifier":"string","device_code":"string","grant_type":"string","project_id":"string","redirect_uri":"string","refresh_token":"string","resource":"string","scope":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "access_token": "string",
  "expires_in": 0,
  "project_id": "string",
  "refresh_token": "string",
  "scope": "string",
  "token_type": "string"
}
Schema
access_tokenstringrequired
expires_inintegerrequired
project_idstringrequired
The one project this token opens (chosen on the consent screen).
refresh_tokenstring
Absent for the jwt-bearer grant: ask the identity provider for a new assertion instead.
scopestringrequired
token_typestringrequired
Bearer
400 RFC 6749 error object
401 invalid_client
429
GEThttps://lucidace.com/v1/orgs/{org_id}/oauth-appsScope admin

Parameters

org_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/orgs/{org_id}/oauth-apps"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
[
  {
    "client_id": "string",
    "created_at": "2024-01-01T00:00:00Z",
    "id": "string",
    "name": "string",
    "org_id": "string",
    "public_client": true,
    "redirect_uris": [
      "string"
    ],
    "registration": "string",
    "scopes": [
      "string"
    ]
  }
]
Schema
client_idstringrequired
created_atstringrequired
idstringrequired
namestringrequired
org_idstring
None for dynamically registered and metadata-document clients.
public_clientbooleanrequired
No client secret: the token endpoint takes the client id alone and PKCE proves the caller.
redirect_urisstring[]required
registrationstringrequired
org (registered by an org admin, verified), dynamic (RFC 7591) or metadata (CIMD).
scopesstring[]required
The most an authorization may grant (API key scope names).
403
404
POSThttps://lucidace.com/v1/orgs/{org_id}/oauth-appsScope admin

Parameters

org_idstringpathrequired

Request body

application/json
namestringrequired
redirect_urisstring[]required
Exact redirect URIs: https://..., or http://localhost / http://127.0.0.1 for development.
scopesstring[]required
API key scopes the app may request (delegate is never grantable).
{
  "name": "string",
  "redirect_uris": [
    "string"
  ],
  "scopes": [
    "string"
  ]
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/orgs/{org_id}/oauth-apps" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","redirect_uris":["string"],"scopes":["string"]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "client_id": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "id": "string",
  "name": "string",
  "org_id": "string",
  "public_client": true,
  "redirect_uris": [
    "string"
  ],
  "registration": "string",
  "scopes": [
    "string"
  ],
  "client_secret": "string"
}
Schema
client_idstringrequired
created_atstringrequired
idstringrequired
namestringrequired
org_idstring
None for dynamically registered and metadata-document clients.
public_clientbooleanrequired
No client secret: the token endpoint takes the client id alone and PKCE proves the caller.
redirect_urisstring[]required
registrationstringrequired
org (registered by an org admin, verified), dynamic (RFC 7591) or metadata (CIMD).
scopesstring[]required
The most an authorization may grant (API key scope names).
client_secretstringrequired
Shown once; only its hash is stored.
400
403
404
DELETEhttps://lucidace.com/v1/orgs/{org_id}/oauth-apps/{id}Scope admin

Parameters

org_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/orgs/{org_id}/oauth-apps/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204 every token of the app is gone too
404
GEThttps://lucidace.com/v1/orgs/{org_id}/trusted-idpsScope admin

Parameters

org_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/orgs/{org_id}/trusted-idps"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of TrustedIdp
Example
{
  "data": [
    {
      "allowed_domains": [
        "string"
      ],
      "created_at": "2024-01-01T00:00:00Z",
      "id": "string",
      "issuer": "string",
      "jwks": "string",
      "jwks_uri": "string",
      "max_scopes": [
        "string"
      ],
      "name": "string",
      "org_id": "string"
    }
  ],
  "next_cursor": "string"
}
Schema
dataTrustedIdp[]required
Show child parameters
allowed_domainsstring[]required
Email domains this IdP may assert users for.
created_atstringrequired
idstringrequired
issuerstringrequired
jwksstring
Pinned public keys (a JWKS document); exclusive with jwks_uri.
jwks_uristring
Where the signing keys are fetched; exclusive with jwks.
max_scopesstring[]required
The most any assertion from this IdP may grant (API key scope names).
namestringrequired
org_idstringrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/orgs/{org_id}/trusted-idpsScope admin

Parameters

org_idstringpathrequired

Request body

application/json

A new trusted IdP. Give exactly one of jwks_uri and jwks.

allowed_domainsstring[]required
Email domains this IdP may assert users for.
issuerstringrequired
The iss the IdP signs assertions with (https://...).
jwksstring
Pinned JWKS document ({"keys":[...]}), used instead of fetching.
jwks_uristring
https:// URL of the IdP's JWKS, fetched on each redemption.
max_scopesstring[]required
The most any assertion may grant (API key scope names; never admin or delegate).
namestringrequired
{
  "allowed_domains": [
    "string"
  ],
  "issuer": "string",
  "jwks": "string",
  "jwks_uri": "string",
  "max_scopes": [
    "string"
  ],
  "name": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/orgs/{org_id}/trusted-idps" \
  -H "Content-Type: application/json" \
  -d '{"allowed_domains":["string"],"issuer":"string","jwks":"string","jwks_uri":"string","max_scopes":["string"],"name":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "allowed_domains": [
    "string"
  ],
  "created_at": "2024-01-01T00:00:00Z",
  "id": "string",
  "issuer": "string",
  "jwks": "string",
  "jwks_uri": "string",
  "max_scopes": [
    "string"
  ],
  "name": "string",
  "org_id": "string"
}
Schema
allowed_domainsstring[]required
Email domains this IdP may assert users for.
created_atstringrequired
idstringrequired
issuerstringrequired
jwksstring
Pinned public keys (a JWKS document); exclusive with jwks_uri.
jwks_uristring
Where the signing keys are fetched; exclusive with jwks.
max_scopesstring[]required
The most any assertion from this IdP may grant (API key scope names).
namestringrequired
org_idstringrequired
400
404
409 issuer already trusted
DELETEhttps://lucidace.com/v1/orgs/{org_id}/trusted-idps/{id}Scope admin

Parameters

org_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/orgs/{org_id}/trusted-idps/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
404
Updated