Skip to main content
POST
Error

Autorizações

Authorization
string
header
obrigatório

Bearer authentication. Send Authorization: Bearer .

Corpo

application/json

Candidate SSO Provider Configuration

SSOProviderConfigInput payload

clientId
string
obrigatório
clientSecret
string
obrigatório

#nosec G117 -- write-only credential, never echoed back in any response

type
enum<string>
obrigatório
Opções disponíveis:
Google,
AzureAD,
Okta,
Custom
Exemplo:

"Google"

customAuthUrl
string
customTokenUrl
string
customUserInfoUrl
string
disablePasswordLogin
boolean
Exemplo:

true

domain
string

Domain is REQUIRED for Type=Okta and ignored otherwise: Casdoor derives an Okta provider's authorize, token and userinfo endpoints from it, and no constant can stand in because they are per-org. Either the org URL (https://.okta.com) or an authorization server base (https://.okta.com/oauth2/default) is accepted; the org URL is completed to its authorization server on write.

Exemplo:

"https://your-org.okta.com"

issuerUrl
string
name
string
scopes
string

Resposta

OK

SSOProviderPreflight payload

authorizationEndpoint
string
Exemplo:

"https://accounts.google.com/o/oauth2/v2/auth"

configValid
boolean
credentialsValid
boolean
discoveryOk
boolean
redirectUriAcceptedByIdp
boolean

RedirectUriAcceptedByIdp reports whether the identity provider redirected the probe back to this deployment's SSO callback. RFC 6749 §3.1.2.4 forbids an authorization server from redirecting to an unregistered redirect_uri, so a redirect that arrives proves the callback is authorized. False means "not proven": an unreachable authorization endpoint, a reply carrying no Location and any other inconclusive answer all read false, so read it as not confirmed rather than as proof the callback is absent from the provider's authorized-redirect list.

tokenEndpoint
string
Exemplo:

"https://oauth2.googleapis.com/token"

userinfoEndpoint
string
Exemplo:

"https://openidconnect.googleapis.com/v1/userinfo"