Create or Update SAML Client
curl -X PUT https://your-domain.com/recipe/saml/clients \
-H "Content-Type: application/json" \
-d '{
"clientId": "my-saml-client",
"clientSecret": "optional-secret",
"defaultRedirectURI": "https://myapp.com/auth/callback",
"redirectURIs": [
"https://myapp.com/auth/callback",
"https://myapp.com/admin/callback"
],
"metadataXML": "base64-encoded-idp-metadata",
"allowIDPInitiatedLogin": false,
"enableRequestSigning": true
}'
{
"status": "OK",
"clientId": "my-saml-client",
"clientSecret": "optional-secret",
"defaultRedirectURI": "https://myapp.com/auth/callback",
"redirectURIs": [
"https://myapp.com/auth/callback",
"https://myapp.com/admin/callback"
],
"idpEntityId": "https://idp.example.com",
"idpSsoUrl": "https://idp.example.com/sso",
"idpCertificate": "-----BEGIN CERTIFICATE-----...",
"allowIDPInitiatedLogin": false,
"enableRequestSigning": true,
"createdAt": 1234567890000,
"updatedAt": 1234567890000
}
Unique identifier for this SAML client. If not provided, one will be auto-generated with prefix “st_saml_”
Optional client secret for additional security
Default redirect URI after successful authentication
Array of allowed redirect URIs (must include defaultRedirectURI)
Base64-encoded SAML IdP metadata XML document
Whether to allow IdP-initiated login flows (default: false)
Whether to sign SAML authentication requests (default: true)
“OK” or “DUPLICATE_IDP_ENTITY_ERROR”
Entity ID extracted from IdP metadata
SSO URL extracted from IdP metadata
X.509 certificate extracted from IdP metadata
List SAML Clients
curl -X GET https://your-domain.com/recipe/saml/clients/list \
-H "Content-Type: application/json"
{
"status": "OK",
"clients": [
{
"clientId": "my-saml-client",
"clientSecret": "optional-secret",
"defaultRedirectURI": "https://myapp.com/auth/callback",
"redirectURIs": [
"https://myapp.com/auth/callback"
],
"idpEntityId": "https://idp.example.com",
"idpSsoUrl": "https://idp.example.com/sso",
"idpCertificate": "-----BEGIN CERTIFICATE-----...",
"allowIDPInitiatedLogin": false,
"enableRequestSigning": true,
"createdAt": 1234567890000,
"updatedAt": 1234567890000
}
]
}
Array of SAML client configurations
Remove SAML Client
curl -X POST https://your-domain.com/recipe/saml/clients/remove \
-H "Content-Type: application/json" \
-d '{
"clientId": "my-saml-client"
}'
{
"status": "OK",
"didExist": true
}
Whether the client existed before removal