Preflight an SSO provider configuration
curl --request POST \
--url https://identity.sandbox.lerian.net/v1/sso/provider/preflight \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientId": "<string>",
"clientSecret": "<string>",
"type": "Google",
"customAuthUrl": "<string>",
"customTokenUrl": "<string>",
"customUserInfoUrl": "<string>",
"disablePasswordLogin": true,
"domain": "https://your-org.okta.com",
"issuerUrl": "<string>",
"name": "<string>",
"scopes": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/sso/provider/preflight"
payload := strings.NewReader("{\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"type\": \"Google\",\n \"customAuthUrl\": \"<string>\",\n \"customTokenUrl\": \"<string>\",\n \"customUserInfoUrl\": \"<string>\",\n \"disablePasswordLogin\": true,\n \"domain\": \"https://your-org.okta.com\",\n \"issuerUrl\": \"<string>\",\n \"name\": \"<string>\",\n \"scopes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientId: '<string>',
clientSecret: '<string>',
type: 'Google',
customAuthUrl: '<string>',
customTokenUrl: '<string>',
customUserInfoUrl: '<string>',
disablePasswordLogin: true,
domain: 'https://your-org.okta.com',
issuerUrl: '<string>',
name: '<string>',
scopes: '<string>'
})
};
fetch('https://identity.sandbox.lerian.net/v1/sso/provider/preflight', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://identity.sandbox.lerian.net/v1/sso/provider/preflight"
payload = {
"clientId": "<string>",
"clientSecret": "<string>",
"type": "Google",
"customAuthUrl": "<string>",
"customTokenUrl": "<string>",
"customUserInfoUrl": "<string>",
"disablePasswordLogin": True,
"domain": "https://your-org.okta.com",
"issuerUrl": "<string>",
"name": "<string>",
"scopes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"authorizationEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
"configValid": true,
"credentialsValid": true,
"discoveryOk": true,
"redirectUriAcceptedByIdp": true,
"tokenEndpoint": "https://oauth2.googleapis.com/token",
"userinfoEndpoint": "https://openidconnect.googleapis.com/v1/userinfo"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}Preflight an SSO provider configuration
Validates a candidate SSO configuration and WRITES NOTHING.
Call it before PUT /v1/sso/provider. The upsert is the call that can lock an organization out of its own login screen; this one costs nothing, so there is no reason to skip it.
The response is a report, not a yes/no: it names what it could and could not verify.
Failures:
400— the candidate configuration is malformed enough that it cannot be checked at all.
POST
/
v1
/
sso
/
provider
/
preflight
Preflight an SSO provider configuration
curl --request POST \
--url https://identity.sandbox.lerian.net/v1/sso/provider/preflight \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientId": "<string>",
"clientSecret": "<string>",
"type": "Google",
"customAuthUrl": "<string>",
"customTokenUrl": "<string>",
"customUserInfoUrl": "<string>",
"disablePasswordLogin": true,
"domain": "https://your-org.okta.com",
"issuerUrl": "<string>",
"name": "<string>",
"scopes": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/sso/provider/preflight"
payload := strings.NewReader("{\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"type\": \"Google\",\n \"customAuthUrl\": \"<string>\",\n \"customTokenUrl\": \"<string>\",\n \"customUserInfoUrl\": \"<string>\",\n \"disablePasswordLogin\": true,\n \"domain\": \"https://your-org.okta.com\",\n \"issuerUrl\": \"<string>\",\n \"name\": \"<string>\",\n \"scopes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientId: '<string>',
clientSecret: '<string>',
type: 'Google',
customAuthUrl: '<string>',
customTokenUrl: '<string>',
customUserInfoUrl: '<string>',
disablePasswordLogin: true,
domain: 'https://your-org.okta.com',
issuerUrl: '<string>',
name: '<string>',
scopes: '<string>'
})
};
fetch('https://identity.sandbox.lerian.net/v1/sso/provider/preflight', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://identity.sandbox.lerian.net/v1/sso/provider/preflight"
payload = {
"clientId": "<string>",
"clientSecret": "<string>",
"type": "Google",
"customAuthUrl": "<string>",
"customTokenUrl": "<string>",
"customUserInfoUrl": "<string>",
"disablePasswordLogin": True,
"domain": "https://your-org.okta.com",
"issuerUrl": "<string>",
"name": "<string>",
"scopes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"authorizationEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
"configValid": true,
"credentialsValid": true,
"discoveryOk": true,
"redirectUriAcceptedByIdp": true,
"tokenEndpoint": "https://oauth2.googleapis.com/token",
"userinfoEndpoint": "https://openidconnect.googleapis.com/v1/userinfo"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}Authorizations
JWT bearer token issued by the identity provider.
Body
application/json
The candidate configuration to validate. Nothing is stored.
Response
OK
Example:
"https://accounts.google.com/o/oauth2/v2/auth"
Example:
"https://oauth2.googleapis.com/token"
Example:
"https://openidconnect.googleapis.com/v1/userinfo"
Was this page helpful?

