Given the name of a provider the user was authenticated with, checks to see if a provider specific logout process is defined and if so creates an AuthSession and returns
A return value of performAuthLogout: true indicates that the user's browser should be forwarded over to the http/logout method with the as (authSessionId) and asn (authSessionNonce) in the URL to complete the logout process.
A return value of
Parameters
Name | Type | Description |
---|---|---|
providerName | String, required | Names of the provider to log the user out of. Typically this should be set to the name of the provider the user logged in with, as returned by getAuthStatus when the user successfully authenticated. The name of the provider the user logged in with should be stored in the user's session to be supplied to this method at a later date. |
returnUrl | String (URL), required | URL to return the user's browser to after passing through the logout system without an error. |
errorReturnUrl | String (URL), required | URL to return the user's browser to after an error within the authentication worker occurs. |
baseAuthWorkerUrl | String (URL), required | Publicly accessible path to the Auth worker, eg http://mysite/apiserver/auth Used internally to build URLs to other endpoints, eg baseAuthWorkerUrl + "/http/logoff" |
namedTemplateOverrides | Array<String>, optional | Affects handlebars template resolution. |
arbitraryReturnData | Map<String, Object>, optional | Returned by getAuthStatus after authenticating, this should be stored in the user's session to be supplied to this method upon logout. Contains arbitrary data returned by actions involved in authenticating a user. May contain OAuth tokens and similar data required by certain providers to be supplied or used during the logout process. |
Response Fields
Name | Type | Description |
---|---|---|
performAuthLogout | Boolean, required | True if the user's browser should be forwarded over to the http/logout method with the as (authSessionId) and asn (authSessionNonce) in the URL to complete the logout process. |
as | String (UUID), required | The authSessionId of the newly created AuthSession. Null if performAuthLogout is false. |
asn | String (UUID), required | The authSessionNonce of the newly created AuthSession. Null if performAuthLogout is false. |
Example Request
{
"id": "635998609805441605",
"jsonrpc": "2.0",
"method": "createLogoutSession",
"params": {
"returnUrl": "http://demodev1.gossinteractive.com/toptasks",
"errorReturnUrl": "http://demodev1.gossinteractive.com/toptasks",
"baseAuthWorkerUrl": "http://demodev1/apiserver/auth",
"providerName": "mygovscot",
"namedTemplateOverrides": [
"toptasks"
],
"arbitraryReturnData": {
"a": "b"
}
}
}
Example Response
{
"id": "635998609805441605",
"jsonrpc": "2.0",
"result": {
"result": {
"performAuthLogout": true,
"as": "8e39c3e6-f2d3-4d06-a7b8-5dd85f460cce",
"asn": "1c25ee14-2755-4440-bbca-d9e5d470f366"
}
}
}