get_pseudo_sso_token¶
- AmorphicPseudoSsoApi.get_pseudo_sso_token(token_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a pseudo-SSO encrypted token
Returns the stored EncryptedString for TokenId. No LambdaAuthorizer and no role_id (OPTIONS also omit those headers). Expired or unknown tokens are not 404.
- Parameters:
token_id (str) – UUID returned by POST /pseudoSSO. Missing TokenId returns IPV-1008. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: GET /pseudoSSO/{TokenId}
Success (HTTP 200)¶
TokenId and EncryptedString for a still-stored item.
Request / response example
{
"TokenId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"EncryptedString": "AQICAHh...encrypted-blob"
}
Errors¶
Documented error codes: IPV-1008, GE-1005, GE-1002, RTE-1001.
HTTP 400
Validation failure. Body is {“Message”: “<CODE> - <text>”}. Codes: IPV-1008 (TokenId missing), GE-1005 (unsupported method).
TokenId missing from the path
{
"Message": "IPV-1008 - Invalid request body, missing key(s) - TokenId"
}
HTTP 500
Unknown, expired, or item without EncryptedString uses GE-1002. Other uncaught errors return {“Message”: “<exception>”} with no RTE-1001 wrap.
Token missing, expired, or has no EncryptedString
{
"Message": "GE-1002 - Failed to fetch EncryptedString, please try again."
}
Uncaught handler failure
{
"Message": "'NoneType' object is not subscriptable"
}