Saml
SAML single sign-on.
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/login/saml2/sso |
create |
|
GET |
/saml2/authenticate/{registrationId} |
load |
|
GET |
/saml2/metadata |
load |
The service provider metadata |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
saml, err := client.Saml(nil).Load(map[string]any{"registration_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(saml)
created, err := client.Saml(nil).Create(map[string]any{"SAMLResponse": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
Lua
Construct client as shown in the Lua setup, then call the operations:
local saml, err = client:Saml():load({ registration_id = "example" })
local created, err = client:Saml():create({ SAMLResponse = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$saml = $client->Saml()->load(["registration_id" => "example"]);
$created = $client->Saml()->create(["SAMLResponse" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
saml = client.Saml().load({"registration_id": "example"})
created = client.Saml().create({ "SAMLResponse": "example" })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
saml = client.Saml.load({ "registration_id" => "example" })
created = client.Saml.create({ "SAMLResponse" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const saml = await client.Saml().load({ registration_id: "example" })
const created = await client.Saml().create({ SAMLResponse: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
RelayState |
string |
No | Opaque state value. |
SAMLResponse |
string |
Yes | Base64-encoded SAML <samlp:Response> message issued by the identity provider. |
create
POST /login/saml2/sso
Operation ID: samlAssertionConsumerService.
Authentication: not required.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
X-External-Correlation-Id |
header |
string (uuid) |
No | Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more. |
Request body
application/x-www-form-urlencoded
| Property | Type | Required | Description |
|---|---|---|---|
RelayState |
string |
No | Opaque state value. If the authentication request included a RelayState, the identity provider returns it unchanged. |
SAMLResponse |
string |
Yes | Base64-encoded SAML <samlp:Response> message issued by the identity provider. |
Responses
302: The SAML response was processed. Your browser is redirected to continue the sign-in flow
429: Rate limit exceeded. Retry after the number of seconds specified in the Retry-After header
application/json
The response is object.
load
GET /saml2/authenticate/{registrationId}
Operation ID: samlAuthenticate.
Authentication: not required.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
registrationId |
path |
string |
Yes | Identifier of the identity provider configuration to authenticate with. |
X-External-Correlation-Id |
header |
string (uuid) |
No | Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more. |
Responses
302: Your browser is redirected to your identity provider with a SAML authentication request
429: Rate limit exceeded. Retry after the number of seconds specified in the Retry-After header
application/json
The response is object.
GET /saml2/metadata
Operation ID: samlMetadataGet.
Authentication: not required.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
X-External-Correlation-Id |
header |
string (uuid) |
No | Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more. |
Responses
200: The service provider metadata
application/samlmetadata+xml
The response is string.
429: Rate limit exceeded. Retry after the number of seconds specified in the Retry-After header
application/json
The response is object.