Identity API
- Base URL:
https://id.epilot.cloud - Full API Docs: https://docs.epilot.io/api/identity
Usageโ
import { epilot } from '@epilot/sdk'
epilot.authorize(() => '<token>')
const { data } = await epilot.identity.listClients(...)
Tree-shakeable importโ
import { getClient, authorize } from '@epilot/sdk/identity'
const identityClient = getClient()
authorize(identityClient, () => '<token>')
const { data } = await identityClient.listClients(...)
Operationsโ
Operator Clients
listClientscreateOidcClientgetOidcClientupdateClientretireClientactivateClientsuspendClientrotateClientSecret
Operator Organizations
listClientOrganizationsenableClientOrganizationgetClientOrganizationupdateClientOrganizationrevokeClientOrganizationsuspendClientOrganizationactivateClientOrganizationgetUserSubject
Session
Launch
Schemas
ErrorPartnerClientIdOrgIdUserIdEnvironmentPartnerClientStatusScopeHttpsUriPartnerClientCreatePartnerClientUpdatePartnerClientPartnerClientWithSecretPartnerClientListStatusChangeRequestRotateSecretRequestAuthorizationPolicyInputAuthorizationPolicyOrgEnablementStatusOrgEnablementCreateOrgEnablementUpdateOrgEnablementOrgEnablementListIdentitySessionUserSubject
listClientsโ
List registered partner clients. The client secret is never returned.
GET /v1/identity/operator/clients
const { data } = await client.listClients({
partner_key: 'example',
status: 'example',
size: 1,
cursor: 'example',
})
Response
{
"results": [
{
"client_id": "bf-prod-x7k2",
"partner_key": "string",
"display_name": "string",
"description": "string",
"environment": "dev",
"redirect_uris": ["https://partner.example.com/auth/callback"],
"sector_identifier_uri": "https://partner.example.com/auth/callback",
"initiate_login_uri": "https://partner.example.com/auth/callback",
"launch_target_prefixes": ["string"],
"token_endpoint_auth_method": "client_secret_basic",
"grant_types": ["authorization_code"],
"scopes_allowed": ["openid"],
"status": "draft",
"status_reason": "string",
"config_version": 1,
"secret_rotated_at": "1970-01-01T00:00:00.000Z",
"previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
],
"next_cursor": "string"
}
createOidcClientโ
Create a partner client in draft status. The client secret is returned exactly once in this
response and can never be read again; use rotateClientSecret to obtain a new one.
POST /v1/identity/operator/clients
const { data } = await client.createOidcClient(
null,
{
partner_key: 'babelforce',
display_name: 'Babelforce',
description: 'string',
environment: 'dev',
redirect_uris: ['https://partner.example.com/auth/callback'],
sector_identifier_uri: 'https://partner.example.com/auth/callback',
initiate_login_uri: 'https://partner.example.com/auth/callback',
launch_target_prefixes: ['string'],
scopes_allowed: ['openid']
},
)
Response
{
"client_id": "bf-prod-x7k2",
"partner_key": "string",
"display_name": "string",
"description": "string",
"environment": "dev",
"redirect_uris": ["https://partner.example.com/auth/callback"],
"sector_identifier_uri": "https://partner.example.com/auth/callback",
"initiate_login_uri": "https://partner.example.com/auth/callback",
"launch_target_prefixes": ["string"],
"token_endpoint_auth_method": "client_secret_basic",
"grant_types": ["authorization_code"],
"scopes_allowed": ["openid"],
"status": "draft",
"status_reason": "string",
"config_version": 1,
"secret_rotated_at": "1970-01-01T00:00:00.000Z",
"previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string",
"client_secret": "string"
}
getOidcClientโ
Read a partner client. The client secret is never returned.
GET /v1/identity/operator/clients/{client_id}
const { data } = await client.getOidcClient({
client_id: 'example',
})
Response
{
"client_id": "bf-prod-x7k2",
"partner_key": "string",
"display_name": "string",
"description": "string",
"environment": "dev",
"redirect_uris": ["https://partner.example.com/auth/callback"],
"sector_identifier_uri": "https://partner.example.com/auth/callback",
"initiate_login_uri": "https://partner.example.com/auth/callback",
"launch_target_prefixes": ["string"],
"token_endpoint_auth_method": "client_secret_basic",
"grant_types": ["authorization_code"],
"scopes_allowed": ["openid"],
"status": "draft",
"status_reason": "string",
"config_version": 1,
"secret_rotated_at": "1970-01-01T00:00:00.000Z",
"previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
updateClientโ
Replace the mutable configuration of a client. config_version must equal the current
version (compare-and-swap); a mismatch is rejected with 409.
PUT /v1/identity/operator/clients/{client_id}
const { data } = await client.updateClient(
{
client_id: 'example',
},
{
config_version: 1,
allow_sector_change: false,
display_name: 'string',
description: 'string',
redirect_uris: ['https://partner.example.com/auth/callback'],
sector_identifier_uri: 'https://partner.example.com/auth/callback',
initiate_login_uri: 'https://partner.example.com/auth/callback',
launch_target_prefixes: ['string'],
scopes_allowed: ['openid']
},
)
Response
{
"client_id": "bf-prod-x7k2",
"partner_key": "string",
"display_name": "string",
"description": "string",
"environment": "dev",
"redirect_uris": ["https://partner.example.com/auth/callback"],
"sector_identifier_uri": "https://partner.example.com/auth/callback",
"initiate_login_uri": "https://partner.example.com/auth/callback",
"launch_target_prefixes": ["string"],
"token_endpoint_auth_method": "client_secret_basic",
"grant_types": ["authorization_code"],
"scopes_allowed": ["openid"],
"status": "draft",
"status_reason": "string",
"config_version": 1,
"secret_rotated_at": "1970-01-01T00:00:00.000Z",
"previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
retireClientโ
Retire a client. The record is kept as a tombstone, the client_id is never reused, every
organization enablement is revoked and all provider-side artefacts are revoked.
DELETE /v1/identity/operator/clients/{client_id}
const { data } = await client.retireClient({
client_id: 'example',
})
Response
{
"client_id": "bf-prod-x7k2",
"partner_key": "string",
"display_name": "string",
"description": "string",
"environment": "dev",
"redirect_uris": ["https://partner.example.com/auth/callback"],
"sector_identifier_uri": "https://partner.example.com/auth/callback",
"initiate_login_uri": "https://partner.example.com/auth/callback",
"launch_target_prefixes": ["string"],
"token_endpoint_auth_method": "client_secret_basic",
"grant_types": ["authorization_code"],
"scopes_allowed": ["openid"],
"status": "draft",
"status_reason": "string",
"config_version": 1,
"secret_rotated_at": "1970-01-01T00:00:00.000Z",
"previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
activateClientโ
Activate a draft or suspended client. Validates that every redirect URI is an absolute
HTTPS URL without fragment, that scopes_allowed contains openid, and that the
authentication method is `c
POST /v1/identity/operator/clients/{client_id}:activate
const { data } = await client.activateClient({
client_id: 'example',
})
Response
{
"client_id": "bf-prod-x7k2",
"partner_key": "string",
"display_name": "string",
"description": "string",
"environment": "dev",
"redirect_uris": ["https://partner.example.com/auth/callback"],
"sector_identifier_uri": "https://partner.example.com/auth/callback",
"initiate_login_uri": "https://partner.example.com/auth/callback",
"launch_target_prefixes": ["string"],
"token_endpoint_auth_method": "client_secret_basic",
"grant_types": ["authorization_code"],
"scopes_allowed": ["openid"],
"status": "draft",
"status_reason": "string",
"config_version": 1,
"secret_rotated_at": "1970-01-01T00:00:00.000Z",
"previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
suspendClientโ
Immediately block the client for every organization. Provider-side artefacts (codes, tokens,
grants) are revoked; the audit trail is kept. Reversible with activateClient.
POST /v1/identity/operator/clients/{client_id}:suspend
const { data } = await client.suspendClient(
{
client_id: 'example',
},
{
reason: 'string'
},
)
Response
{
"client_id": "bf-prod-x7k2",
"partner_key": "string",
"display_name": "string",
"description": "string",
"environment": "dev",
"redirect_uris": ["https://partner.example.com/auth/callback"],
"sector_identifier_uri": "https://partner.example.com/auth/callback",
"initiate_login_uri": "https://partner.example.com/auth/callback",
"launch_target_prefixes": ["string"],
"token_endpoint_auth_method": "client_secret_basic",
"grant_types": ["authorization_code"],
"scopes_allowed": ["openid"],
"status": "draft",
"status_reason": "string",
"config_version": 1,
"secret_rotated_at": "1970-01-01T00:00:00.000Z",
"previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
rotateClientSecretโ
Issue a new client secret. The new secret is returned exactly once. The previous secret
keeps working until previous_secret_expires_at unless compromise_mode is set, in which
case it stops working
POST /v1/identity/operator/clients/{client_id}:rotateSecret
const { data } = await client.rotateClientSecret(
{
client_id: 'example',
},
{
compromise_mode: false,
migration_window_seconds: 86400
},
)
Response
{
"client_id": "bf-prod-x7k2",
"partner_key": "string",
"display_name": "string",
"description": "string",
"environment": "dev",
"redirect_uris": ["https://partner.example.com/auth/callback"],
"sector_identifier_uri": "https://partner.example.com/auth/callback",
"initiate_login_uri": "https://partner.example.com/auth/callback",
"launch_target_prefixes": ["string"],
"token_endpoint_auth_method": "client_secret_basic",
"grant_types": ["authorization_code"],
"scopes_allowed": ["openid"],
"status": "draft",
"status_reason": "string",
"config_version": 1,
"secret_rotated_at": "1970-01-01T00:00:00.000Z",
"previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string",
"client_secret": "string"
}
listClientOrganizationsโ
List the organizations enabled on a client, including suspended and revoked ones.
GET /v1/identity/operator/clients/{client_id}/organizations
const { data } = await client.listClientOrganizations({
client_id: 'example',
status: 'example',
})
Response
{
"results": [
{
"client_id": "bf-prod-x7k2",
"org_id": "739224",
"status": "active",
"status_reason": "string",
"authorization_policy": {
"mode": "preauthorized",
"population": "all_current_org_members",
"allowed_scopes": ["openid"],
"customer_approval_ref": "string",
"approved_at": "1970-01-01T00:00:00.000Z",
"version": 1,
"mandatory_claims": ["org_id"],
"recorded_by": "string",
"recorded_at": "1970-01-01T00:00:00.000Z"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
]
}
enableClientOrganizationโ
Enable an epilot organization on a client, recording the customer's authorization policy
(version 1). allowed_scopes must contain openid and be a subset of the client's
scopes_allowed.
POST /v1/identity/operator/clients/{client_id}/organizations
const { data } = await client.enableClientOrganization(
{
client_id: 'example',
},
{
org_id: '739224',
authorization_policy: {
mode: 'preauthorized',
population: 'all_current_org_members',
allowed_scopes: ['openid'],
customer_approval_ref: 'string',
approved_at: '1970-01-01T00:00:00.000Z'
}
},
)
Response
{
"client_id": "bf-prod-x7k2",
"org_id": "739224",
"status": "active",
"status_reason": "string",
"authorization_policy": {
"mode": "preauthorized",
"population": "all_current_org_members",
"allowed_scopes": ["openid"],
"customer_approval_ref": "string",
"approved_at": "1970-01-01T00:00:00.000Z",
"version": 1,
"mandatory_claims": ["org_id"],
"recorded_by": "string",
"recorded_at": "1970-01-01T00:00:00.000Z"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
getClientOrganizationโ
Read one organization enablement.
GET /v1/identity/operator/clients/{client_id}/organizations/{org_id}
const { data } = await client.getClientOrganization({
client_id: 'example',
org_id: 'example',
})
Response
{
"client_id": "bf-prod-x7k2",
"org_id": "739224",
"status": "active",
"status_reason": "string",
"authorization_policy": {
"mode": "preauthorized",
"population": "all_current_org_members",
"allowed_scopes": ["openid"],
"customer_approval_ref": "string",
"approved_at": "1970-01-01T00:00:00.000Z",
"version": 1,
"mandatory_claims": ["org_id"],
"recorded_by": "string",
"recorded_at": "1970-01-01T00:00:00.000Z"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
updateClientOrganizationโ
Record a new version of the customer's authorization policy. expected_policy_version must
equal the current version (compare-and-swap); a mismatch is rejected with 409.
PUT /v1/identity/operator/clients/{client_id}/organizations/{org_id}
const { data } = await client.updateClientOrganization(
{
client_id: 'example',
org_id: 'example',
},
{
expected_policy_version: 1,
authorization_policy: {
mode: 'preauthorized',
population: 'all_current_org_members',
allowed_scopes: ['openid'],
customer_approval_ref: 'string',
approved_at: '1970-01-01T00:00:00.000Z'
}
},
)
Response
{
"client_id": "bf-prod-x7k2",
"org_id": "739224",
"status": "active",
"status_reason": "string",
"authorization_policy": {
"mode": "preauthorized",
"population": "all_current_org_members",
"allowed_scopes": ["openid"],
"customer_approval_ref": "string",
"approved_at": "1970-01-01T00:00:00.000Z",
"version": 1,
"mandatory_claims": ["org_id"],
"recorded_by": "string",
"recorded_at": "1970-01-01T00:00:00.000Z"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
revokeClientOrganizationโ
Revoke an organization's enablement. The record is kept as an audited tombstone; future
authorizations for this organization fail with access_denied and provider-side artefacts
bound to it are revok
DELETE /v1/identity/operator/clients/{client_id}/organizations/{org_id}
const { data } = await client.revokeClientOrganization(
{
client_id: 'example',
org_id: 'example',
},
{
reason: 'string'
},
)
Response
{
"client_id": "bf-prod-x7k2",
"org_id": "739224",
"status": "active",
"status_reason": "string",
"authorization_policy": {
"mode": "preauthorized",
"population": "all_current_org_members",
"allowed_scopes": ["openid"],
"customer_approval_ref": "string",
"approved_at": "1970-01-01T00:00:00.000Z",
"version": 1,
"mandatory_claims": ["org_id"],
"recorded_by": "string",
"recorded_at": "1970-01-01T00:00:00.000Z"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
suspendClientOrganizationโ
Temporarily block one organization on this client. Reversible with activateClientOrganization.
POST /v1/identity/operator/clients/{client_id}/organizations/{org_id}:suspend
const { data } = await client.suspendClientOrganization(
{
client_id: 'example',
org_id: 'example',
},
{
reason: 'string'
},
)
Response
{
"client_id": "bf-prod-x7k2",
"org_id": "739224",
"status": "active",
"status_reason": "string",
"authorization_policy": {
"mode": "preauthorized",
"population": "all_current_org_members",
"allowed_scopes": ["openid"],
"customer_approval_ref": "string",
"approved_at": "1970-01-01T00:00:00.000Z",
"version": 1,
"mandatory_claims": ["org_id"],
"recorded_by": "string",
"recorded_at": "1970-01-01T00:00:00.000Z"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
activateClientOrganizationโ
Resume a suspended organization on this client. Revoked enablements cannot be re-activated; enabling the organization again (POST โฆ/organizations) replaces the revoked entry and continues its policy
POST /v1/identity/operator/clients/{client_id}/organizations/{org_id}:activate
const { data } = await client.activateClientOrganization({
client_id: 'example',
org_id: 'example',
})
Response
{
"client_id": "bf-prod-x7k2",
"org_id": "739224",
"status": "active",
"status_reason": "string",
"authorization_policy": {
"mode": "preauthorized",
"population": "all_current_org_members",
"allowed_scopes": ["openid"],
"customer_approval_ref": "string",
"approved_at": "1970-01-01T00:00:00.000Z",
"version": 1,
"mandatory_claims": ["org_id"],
"recorded_by": "string",
"recorded_at": "1970-01-01T00:00:00.000Z"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_by": "string"
}
getUserSubjectโ
The pairwise sub this client receives for one epilot user, so the partner can bind the person on its
side before the first sign-in (for example a Babelforce agent provisioned through SCIM with
`
GET /v1/identity/operator/clients/{client_id}/organizations/{org_id}/users/{user_id}:subject
const { data } = await client.getUserSubject({
client_id: 'example',
org_id: 'example',
user_id: 'example',
})
Response
{
"client_id": "bf-prod-x7k2",
"org_id": "739224",
"user_id": "100321",
"sub": "v1.dGhpcy1pcy1hLWR1bW15LXN1YmplY3QtdmFsdWUtMDAx",
"key_version": "v1",
"sector": "portal.epilot.cloud"
}
createIdentitySessionโ
Called by the epilot portal through the portal-host proxy after every persisted 360 session.
Validates the 360 bearer token itself and mirrors it into the identity_session cookie
(`HttpOnly; Secure;
GET /v1/identity/session
const { data } = await client.createIdentitySession()
Response
{
"org_id": "739224",
"user_id": "string",
"expires_at": "1970-01-01T00:00:00.000Z"
}
deleteIdentitySessionโ
Clears the identity_session cookie. Called by the portal on logout.
DELETE /v1/identity/session
const { data } = await client.deleteIdentitySession()
launchClientโ
One validated place for partner start links (manager UI, hosted apps). Redirects the browser to the
client's registered initiate_login_uri with iss set to this issuer and, when given, the deep lin
GET /v1/identity/launch/{client_id}
const { data } = await client.launchClient({
client_id: 'example',
target: 'example',
extra: 'example',
})
Schemasโ
Errorโ
type Error = {
status: number
error: string
details?: Record<string, unknown>[]
}
PartnerClientIdโ
Opaque client identifier, unique within the issuer, never reused
type PartnerClientId = string
OrgIdโ
epilot organization id, an opaque case-sensitive string
type OrgId = string
UserIdโ
epilot user id (custom:ivy_user_id in a 360 token). A user belongs to exactly one organization.
type UserId = string
Environmentโ
Partner-side environment this client belongs to
type Environment = "dev" | "staging" | "production"
PartnerClientStatusโ
type PartnerClientStatus = "draft" | "active" | "suspended" | "retired"
Scopeโ
type Scope = "openid" | "email" | "profile"
HttpsUriโ
Absolute HTTPS URL without fragment
type HttpsUri = string // uri
PartnerClientCreateโ
type PartnerClientCreate = {
partner_key: string
display_name: string
description?: string
environment: "dev" | "staging" | "production"
redirect_uris: string // uri[]
sector_identifier_uri?: string // uri
initiate_login_uri?: string // uri
launch_target_prefixes?: string[]
scopes_allowed?: "openid" | "email" | "profile"[]
}
PartnerClientUpdateโ
type PartnerClientUpdate = {
config_version: number
allow_sector_change?: boolean
display_name: string
description?: string
redirect_uris: string // uri[]
sector_identifier_uri?: string // uri
initiate_login_uri?: string // uri
launch_target_prefixes?: string[]
scopes_allowed: "openid" | "email" | "profile"[]
}
PartnerClientโ
type PartnerClient = {
client_id: string
partner_key: string
display_name: string
description?: string
environment: "dev" | "staging" | "production"
redirect_uris: string // uri[]
sector_identifier_uri?: string // uri
initiate_login_uri?: string // uri
launch_target_prefixes?: string[]
token_endpoint_auth_method: "client_secret_basic"
grant_types: "authorization_code"[]
scopes_allowed: "openid" | "email" | "profile"[]
status: "draft" | "active" | "suspended" | "retired"
status_reason?: string
config_version: number
secret_rotated_at?: string // date-time
previous_secret_expires_at?: string // date-time
created_at: string // date-time
updated_at: string // date-time
created_by?: string
updated_by?: string
}
PartnerClientWithSecretโ
type PartnerClientWithSecret = {
client_id: string
partner_key: string
display_name: string
description?: string
environment: "dev" | "staging" | "production"
redirect_uris: string // uri[]
sector_identifier_uri?: string // uri
initiate_login_uri?: string // uri
launch_target_prefixes?: string[]
token_endpoint_auth_method: "client_secret_basic"
grant_types: "authorization_code"[]
scopes_allowed: "openid" | "email" | "profile"[]
status: "draft" | "active" | "suspended" | "retired"
status_reason?: string
config_version: number
secret_rotated_at?: string // date-time
previous_secret_expires_at?: string // date-time
created_at: string // date-time
updated_at: string // date-time
created_by?: string
updated_by?: string
client_secret: string
}
PartnerClientListโ
type PartnerClientList = {
results: Array<{
client_id: string
partner_key: string
display_name: string
description?: string
environment: "dev" | "staging" | "production"
redirect_uris: string // uri[]
sector_identifier_uri?: string // uri
initiate_login_uri?: string // uri
launch_target_prefixes?: string[]
token_endpoint_auth_method: "client_secret_basic"
grant_types: "authorization_code"[]
scopes_allowed: "openid" | "email" | "profile"[]
status: "draft" | "active" | "suspended" | "retired"
status_reason?: string
config_version: number
secret_rotated_at?: string // date-time
previous_secret_expires_at?: string // date-time
created_at: string // date-time
updated_at: string // date-time
created_by?: string
updated_by?: string
}>
next_cursor?: string
}
StatusChangeRequestโ
type StatusChangeRequest = {
reason?: string
}
RotateSecretRequestโ
type RotateSecretRequest = {
compromise_mode?: boolean
migration_window_seconds?: number
}
AuthorizationPolicyInputโ
type AuthorizationPolicyInput = {
mode?: "preauthorized"
population?: "all_current_org_members"
allowed_scopes: "openid" | "email" | "profile"[]
customer_approval_ref: string
approved_at?: string // date-time
}
AuthorizationPolicyโ
type AuthorizationPolicy = {
mode?: "preauthorized"
population?: "all_current_org_members"
allowed_scopes: "openid" | "email" | "profile"[]
customer_approval_ref: string
approved_at: string // date-time
version: number
mandatory_claims: "org_id"[]
recorded_by: string
recorded_at: string // date-time
}
OrgEnablementStatusโ
type OrgEnablementStatus = "active" | "suspended" | "revoked"
OrgEnablementCreateโ
type OrgEnablementCreate = {
org_id: string
authorization_policy: {
mode?: "preauthorized"
population?: "all_current_org_members"
allowed_scopes: "openid" | "email" | "profile"[]
customer_approval_ref: string
approved_at?: string // date-time
}
}
OrgEnablementUpdateโ
type OrgEnablementUpdate = {
expected_policy_version: number
authorization_policy: {
mode?: "preauthorized"
population?: "all_current_org_members"
allowed_scopes: "openid" | "email" | "profile"[]
customer_approval_ref: string
approved_at?: string // date-time
}
}
OrgEnablementโ
type OrgEnablement = {
client_id: string
org_id: string
status: "active" | "suspended" | "revoked"
status_reason?: string
authorization_policy: {
mode?: "preauthorized"
population?: "all_current_org_members"
allowed_scopes: "openid" | "email" | "profile"[]
customer_approval_ref: string
approved_at: string // date-time
version: number
mandatory_claims: "org_id"[]
recorded_by: string
recorded_at: string // date-time
}
created_at: string // date-time
updated_at: string // date-time
created_by?: string
updated_by?: string
}
OrgEnablementListโ
type OrgEnablementList = {
results: Array<{
client_id: string
org_id: string
status: "active" | "suspended" | "revoked"
status_reason?: string
authorization_policy: {
mode?: { ... }
population?: { ... }
allowed_scopes: { ... }
customer_approval_ref: { ... }
approved_at: { ... }
version: { ... }
mandatory_claims: { ... }
recorded_by: { ... }
recorded_at: { ... }
}
created_at: string // date-time
updated_at: string // date-time
created_by?: string
updated_by?: string
}>
}
IdentitySessionโ
type IdentitySession = {
org_id: string
user_id: string
expires_at: string // date-time
}
UserSubjectโ
type UserSubject = {
client_id: string
org_id: string
user_id: string
sub: string
key_version: string
sector: string
}