Signoff (Cross-Protocol)
GET {{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}
The GET {{authPath}}/{{envID}}/xp/signoff operation operation initiates cross-protocol logout for the identity provider associated with a user. The OIDC, WS-Fed, and SAML participants are all notified as part of the logout process. Use the optional post_logout_redirect_uri parameter to specify where the user should be redirected after logout.
The post_logout_redirect_uri value must exactly match the postLogoutRedirectUris property value (if this is specified). See Logout Settings. If there is no match, the user lands on the signed-off page.
The request response is either `200 OK, or `302 Found with the redirect URI in the Location header.
When the Logout Settings property enableCrossProtocolSLO is enabled, the existing signoff endpoints for the OIDC, WS-Fed, and SAML protocols redirect to {{authPath}}/{{envID}}/xp/signoff to trigger cross-protocol logout. See Logout Settings for more information.
When the {{authPath}}/{{envID}}/xp/signoff endpoint is called directly, cross-protocol logout is always initiated.
Example Request
-
cURL
-
C#
-
Go
-
HTTP
-
Java
-
jQuery
-
NodeJS
-
Python
-
PHP
-
Ruby
-
Swift
curl --location --globoff '{{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}' \
--header 'Cookie: {{sessionToken}}'
var options = new RestClientOptions("{{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Cookie", "{{sessionToken}}");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Cookie", "{{sessionToken}}")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
GET /{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}} HTTP/1.1
Host: {{authPath}}
Cookie: {{sessionToken}}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("{{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}")
.method("GET", body)
.addHeader("Cookie", "{{sessionToken}}")
.build();
Response response = client.newCall(request).execute();
var settings = {
"url": "{{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}",
"method": "GET",
"timeout": 0,
"headers": {
"Cookie": "{{sessionToken}}"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}',
'headers': {
'Cookie': '{{sessionToken}}'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}"
payload = {}
headers = {
'Cookie': '{{sessionToken}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Cookie' => '{{sessionToken}}'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
require "uri"
require "net/http"
url = URI("{{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Cookie"] = "{{sessionToken}}"
response = http.request(request)
puts response.read_body
var request = URLRequest(url: URL(string: "{{authPath}}/{{envID}}/xp/signoff?postLogoutRedirectUris={{redirect_uri}}")!,timeoutInterval: Double.infinity)
request.addValue("{{sessionToken}}", forHTTPHeaderField: "Cookie")
request.httpMethod = "GET"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()