Create an oidc configuration

Creates a new oidc configuration.

POST/v3/accounts/{id}/oidc-configuration
JWT
account:write

Parameters

NameTypeInDescription
id*stringpath

Request Body Schema

PropertyTypeDescriptionConstraints
issuerUrl*stringOIDC Issuer URL.min: 1, max: 2048, format: uri
clientId*stringOIDC Client ID.min: 1, max: 2048
additionalClientIdsarrayAdditional Client IDs that are authorized.items: string
defaultRole*stringDefault role assigned to the new users.min: 1, max: 256
autoProvisionUsers*booleanIf enabled, a new User in Cryptlex is automatically created at first sign-in.
roleMappingsarrayRole mappings.items: object
identityProviderRole*stringIdentity provider role.min: 1, max: 256
serviceProviderRole*stringService provider role.min: 1, max: 256
enabled*booleanEnable or disable the OIDC SSO.
claimMappingobject
emailarrayJWT claim to map to the User email. User will not be created if an email is not found. By default, the email is mapped to 'email' property in the [UserInfo response](https://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse).items: string
namearrayJWT claim to map to the User name. Name will be set to 'External User' if not found.items: string
rolearrayJWT claim to map to the User role. Default role will used if not found.items: string

Request Example

{
  "issuerUrl": "http://example.com",
  "clientId": "string",
  "additionalClientIds": [
    "string"
  ],
  "defaultRole": "string",
  "autoProvisionUsers": true,
  "roleMappings": [
    {
      "identityProviderRole": "string",
      "serviceProviderRole": "string"
    }
  ],
  "enabled": true,
  "claimMapping": {
    "email": [
      "string"
    ],
    "name": [
      "string"
    ],
    "role": [
      "string"
    ]
  }
}
Triggers webhook: oidcConfiguration.created
POST <your-webhook-url>
{
  "event": "oidcConfiguration.created",
  "data": {
    "id": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "issuerUrl": "string",
    "clientId": "string",
    "additionalClientIds": [
      "string"
    ],
    "enabled": true,
    "defaultRole": "string",
    "autoProvisionUsers": true,
    "roleMappings": [
      {
        "id": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z",
        "serviceProviderRole": "string",
        "identityProviderRole": "string"
      }
    ],
    "claimMapping": {
      "name": [
        "string"
      ],
      "email": [
        "string"
      ],
      "role": [
        "string"
      ]
    }
  },
  "triggeredAt": "string"
}

Responses

200 OK
{
  "id": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "issuerUrl": "string",
  "clientId": "string",
  "additionalClientIds": [
    "string"
  ],
  "enabled": true,
  "defaultRole": "string",
  "autoProvisionUsers": true,
  "roleMappings": [
    {
      "id": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "serviceProviderRole": "string",
      "identityProviderRole": "string"
    }
  ],
  "claimMapping": {
    "name": [
      "string"
    ],
    "email": [
      "string"
    ],
    "role": [
      "string"
    ]
  }
}