OAuth / SAML callback (POST)
curl --request POST \
--url http://localhost:3010/auth/{id}/{provider}/callback \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'SAMLResponse=<string>' \
--data 'RelayState=<string>'import requests
url = "http://localhost:3010/auth/{id}/{provider}/callback"
payload = {
"SAMLResponse": "<string>",
"RelayState": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({SAMLResponse: '<string>', RelayState: '<string>'})
};
fetch('http://localhost:3010/auth/{id}/{provider}/callback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3010",
CURLOPT_URL => "http://localhost:3010/auth/{id}/{provider}/callback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3010/auth/{id}/{provider}/callback"
payload := strings.NewReader("SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3010/auth/{id}/{provider}/callback")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3010/auth/{id}/{provider}/callback")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"Status": "error",
"Error": "Profile not found"
}Auth
OAuth / SAML callback (POST)
Same as the GET callback but accepts a POST body — required for SAML HTTP-POST
binding where the IdP POSTs the SAMLResponse form field to the ACS URL.
POST
/
auth
/
{id}
/
{provider}
/
callback
OAuth / SAML callback (POST)
curl --request POST \
--url http://localhost:3010/auth/{id}/{provider}/callback \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'SAMLResponse=<string>' \
--data 'RelayState=<string>'import requests
url = "http://localhost:3010/auth/{id}/{provider}/callback"
payload = {
"SAMLResponse": "<string>",
"RelayState": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({SAMLResponse: '<string>', RelayState: '<string>'})
};
fetch('http://localhost:3010/auth/{id}/{provider}/callback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3010",
CURLOPT_URL => "http://localhost:3010/auth/{id}/{provider}/callback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3010/auth/{id}/{provider}/callback"
payload := strings.NewReader("SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3010/auth/{id}/{provider}/callback")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3010/auth/{id}/{provider}/callback")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"Status": "error",
"Error": "Profile not found"
}Path Parameters
The unique identifier of the authentication profile.
The provider sub-path. For Social/OIDC providers this is the Goth provider
name (e.g. github, linkedin, openid-connect). For SAML it is saml.
For LDAP/Proxy it matches the configured provider identifier.
Body
application/x-www-form-urlencoded
Response
Redirect to ReturnURL after successful authentication.
Was this page helpful?
⌘I