Skip to content
Dashboard
Theme
Theme

Trust a third-party token issuer

POST /v1/trusted_issuers: Trust a third-party token issuer.

View Markdown

POST /v1/trusted_issuers

Business plan and above. Tokens from this issuer can be exchanged at POST /v1/sso/token_exchange. Keys come only from jwks_url (https, fetched through the SSRF-checked client and cached); algorithms is a subset of RS256, ES256 and EdDSA.

Scope
environment:write
Auth
Secret key (sk_…)
Since
1.0
  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • Idempotency-Key string

    Honoured for 24 h; a replay returns the original response.

    min length 1 · max length 255

  • issuer string Required

    min length 1 · max length 1024

  • jwks_url string (uri) Required

    max length 2048

  • audiences array of string Required

    min items 1 · max items 10

  • algorithms array of string Required

    min items 1 · max items 3

  • skew_seconds integer

    min 0 · max 300 · default 60

  • claim_mapping TrustedIssuerClaimMapping

  • organization_id string

  • jit_by_domain boolean

    default false

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/trusted_issuers" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"issuer": "https://idp.acme.com/saml/metadata",
"jwks_url": "https://app.acme.com/callback",
"audiences": [
"https://api.acme.com"
],
"algorithms": [
"RS256"
]
}'
Response 201
{
"object": "trusted_issuer",
"id": "01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"issuer": "https://idp.acme.com/saml/metadata",
"jwks_url": "https://app.acme.com/callback",
"audiences": [
"https://api.acme.com"
],
"algorithms": [
"example_algorithm"
],
"skew_seconds": 1,
"claim_mapping": {
"subject": "example_subject",
"email": "jane@acme.com",
"email_verified": "example_email_verified",
"first_name": "Jane",
"last_name": "Doe"
},
"organization_id": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"jit_by_domain": true,
"created_at": "2026-01-15T09:30:00Z"
}