Single Sign-On API \ Destroy SSO session for identity PHP SDK

Resource/URI - Base GET POST PUT DELETE
Single Sign-On Sessions /sso/sessions.json List SSO sessions
Single Sign-On Session /sso/sessions/<sso_session_token>.json Read SSO session Delete SSO session

Resource/URI - Identity GET POST PUT DELETE
Single Sign-On Identity Session /sso/sessions/identities/<identity_token>.json Read SSO session Start SSO session Destroy SSO session

Workflow

Request: the code to send to the API

Send a DELETE request to the endpoint /sso/sessions/identites/<identity_token>.json in order to destroy the Single Sign-On session for the specified identity_token. This will invalidate the cookies that have been set for that session and the user will no longer be logged in through SSO.

To prevent you from unintentionally deleting an entry by mixing up the DELETE/GET methods you have to include the url parameter confirm_deletion=true in your DELETE requests. If you omit this parameter, the entry will not be removed and an error will be thrown.

Result: the code returned by the API

The API either returns a HTTP status code 200 if the entry was deleted successfully or an appropriate message body with further details on the error that occured.

Example Resultset

{
	"response": {
		"request": {
			"date": "Tue, 23 Feb 2016 11:41:32  0100",
			"resource": "/sso/sessions/identities/6f9622a4-57f0-40e6-bc50-bcba6a7499af.json?confirm_deletion=true",
			"status": {
				"flag": "success",
				"code": 200,
				"info": "The single sign-on session for this identity has successfully been removed"
			}
		}
	}
}

User Contributed Notes