Single Sign-On API \ Start 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 PUT request to the endpoint /sso/sessions/identities/<identity_token>.json in order to start a Single Sign-On session for an identity.The <identity_token> has to be replaced by the unique token of an identity. Already-existing sessions for the same identity are deleted and invalidated.

Optional POST data to include in your request

{
    "request": {
        "sso_session": {
            "top_realm": "#top_realm#",
            "sub_realm": "#sub_realm#",
            "lifetime": "#lifetime#",
            "data": "#data#"
        }
    }
}
Key Description
#top_realm# An optional string to specify the primary realm of this SSO session.
Example: vegetables
Default: not set
#sub_realm# An optional string to specify the secondary realm of this SSO session.
Example: carrot
Default: not set
#lifetime# An optional numeric value that represents the lifetime of the SSO session in seconds.
Sessions are automatically queued for deletion once their lifetime has expired.
Example: 7200
Default: 86400
#data# Optional data (string/json) to store for that session.
Example: https://www.oneall.com/
Default: no value

Result: the code returned by the API

The API either returns a HTTP status code 201 and the details of the created session or an appropriate message body with further details on the error that occured.

Example Resultset

		{
			"response": {
				"request": {
					"date": "Thu, 23 Jan 2014 17:05:58 +0100",
					"resource": "/sso/sessions/identities/1227f9b2-9cf9-42df-a72c-05902cf50ee8.json",
					"status": {
						"flag": "created",
						"code": 201,
						"info": "Your request has been processed successfully and resulted in a new resource being created"
					}
				},
				"result": {
					"data": {
						"sso_session": {
							"sso_session_token": "508e55b6-5221-4226-96b2-b7dc9de284be",
							"user_token": "c4df301a-5b6b-492d-89e9-1ba0eab5b986",
							"identity_token": "1227f9b2-9cf9-42df-a72c-05902cf50ee8",
							"top_realm": "vegetables",
							"sub_realm": "carrot",						
							"date_creation": "Thu, 23 Jan 2014 14:26:05 +0100",
							"date_update": "Thu, 23 Jan 2014 17:05:58 +0100",
							"date_expiration": "Fri, 24 Jan 2014 17:05:58 +0100"						
						}
					}
				}
			}
		}

User Contributed Notes