All URIs are relative to https://secure.ultracart.com/rest/v2
Method | HTTP request | Description |
---|---|---|
getSsoSessionUser | GET /sso/session/user | Get single sign on session user |
ssoAuthorize | PUT /sso/authorize | Authorize a single sign on session |
ssoSessionRevoke | DELETE /sso/session/revoke | Revoke single sign on session |
ssoToken | PUT /sso/token | Exchange a single sign on code for a simple key token |
\ultracart\v2\models\User getSsoSessionUser()
Get single sign on session user
This is the equivalent of logging out of the single sign on session
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\SsoApi::usingApiKey($simple_key);
try {
$result = $apiInstance->getSsoSessionUser();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SsoApi->getSsoSessionUser: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\ultracart\v2\models\SingleSignOnAuthorizeResponse ssoAuthorize($authorization_request)
Authorize a single sign on session
Starts the process of authorizing a single sign on session.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\SsoApi::usingApiKey($simple_key);
$authorization_request = new \ultracart\v2\models\SingleSignOnAuthorizeRequest(); // \ultracart\v2\models\SingleSignOnAuthorizeRequest | Authorization request
try {
$result = $apiInstance->ssoAuthorize($authorization_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SsoApi->ssoAuthorize: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization_request | \ultracart\v2\models\SingleSignOnAuthorizeRequest | Authorization request |
\ultracart\v2\models\SingleSignOnAuthorizeResponse
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ssoSessionRevoke()
Revoke single sign on session
This is the equivalent of logging out of the single sign on session
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\SsoApi::usingApiKey($simple_key);
try {
$apiInstance->ssoSessionRevoke();
} catch (Exception $e) {
echo 'Exception when calling SsoApi->ssoSessionRevoke: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
void (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\ultracart\v2\models\SingleSignOnTokenResponse ssoToken($token_request)
Exchange a single sign on code for a simple key token
Called by your application after receiving the code back on the redirect URI to obtain a simple key token to make API calls with
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\SsoApi::usingApiKey($simple_key);
$token_request = new \ultracart\v2\models\SingleSignOnTokenRequest(); // \ultracart\v2\models\SingleSignOnTokenRequest | Token request
try {
$result = $apiInstance->ssoToken($token_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SsoApi->ssoToken: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
token_request | \ultracart\v2\models\SingleSignOnTokenRequest | Token request |
\ultracart\v2\models\SingleSignOnTokenResponse
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]