Validate a SAMLResponse or OIDC code received by the app's own ACS
POST /v1/sso/forwarded: Validate a SAMLResponse or OIDC code received by the app's own ACS.
POST /v1/sso/forwarded
- Scope
sso:forward- Auth
- Secret key (
sk_…) - Since
- 1.0
Headers
Section titled “Headers”
Minor version; defaults to the environment’s pin.OhAuthCat-Versionstring
Honoured for 24 h; a replay returns the original response.Idempotency-Keystringmin length 1 · max length 255
Request body
Section titled “Request body”connectionstring Required
Base64 SAMLResponse as received by the app’s own ACS.saml_responsestringrelay_statestring
The app’s ACS URL the response was posted to; optional when the connection registers exactly one.acs_urlstring (uri)
The ID of the AuthnRequest the app sent; omit only for an IdP-initiated response (refused unless the connection allows those).in_response_tostringoidc_codestringredirect_uristring (uri)
The PKCE verifier of the app’s own OIDC authorization request (required withcode_verifierstringoidc_code).
The nonce of the app’s own OIDC authorization request (required withnoncestringoidc_code).
A publishable key (client_idstringpk_…) of the same environment; the access token’s audience. Required.
Responses
Section titled “Responses”- 200 OK SsoToken
- 400 Invalid request. Codes: parameter_invalid, parameter_missing, version_unsupported and resource-specific codes from the catalogue. Error
- 401 Codes: authentication_required, api_key_invalid. Error
- 403 Codes: api_key_scope_missing, ip_not_allowed, plan_limit_reached. Error
- 409 Codes: idempotency_key_reused and resource-specific conflicts. Error
- 429 Code: rate_limited. Retry-After is set. Error
- 503 Code: service_unavailable. Retry-After is set; writes are paused. Error
- default Any other error, including internal_error. Every code is in the error catalogue. Error
Errors share one shape; see the error code catalogue.
curl -X POST \ "https://auth.ohauthcat.com/v1/sso/forwarded" \ -H "Authorization: Bearer $OHAUTHCAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "connection": "conn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5"}'const response = await fetch("https://auth.ohauthcat.com/v1/sso/forwarded", { method: "POST", headers: { Authorization: `Bearer ${process.env.OHAUTHCAT_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "connection": "conn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5" }),});const data = await response.json();import osimport requests
response = requests.post( "https://auth.ohauthcat.com/v1/sso/forwarded", headers={"Authorization": f"Bearer {os.environ['OHAUTHCAT_API_KEY']}"}, json={ "connection": "conn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5", },)data = response.json(){ "access_token": "sk_test_example", "token_type": "Bearer", "expires_in": 600, "profile": { "claims": {}, "risk": { "score": 0, "reasons": [ "impossible_travel" ], "degraded": true }, "custom_attributes": {}, "policy_hints": { "force_sso": true, "force_sso_excluded": true, "max_age_seconds": 1, "idp_initiated_allowed": true, "guest": true }, "access_policy": "guest", "email_verified": true, "idp_groups_verified": true, "id": "prof_01J9ZQ4M7K2X8V3N5B6C1D0E9F", "object": "profile", "organization_id": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "connection_id": "conn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "connection_type": "saml", "idp_id": "0oa1b2c3d4E5F6g7h8i9", "email": "jane@acme.com", "email_domain_verified": true, "first_name": "Jane", "last_name": "Doe", "groups": [ "Engineering" ], "role": "admin", "attributes": {}, "raw_attributes": {}, "legacy_ids": { "workos": "org_01H8ZQ4M7K2X8V3N5B6C1D0E9F" } }}