store_pseudo_sso_token¶
- AmorphicPseudoSsoApi.store_pseudo_sso_token(role_id, store_pseudo_sso_token_request, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Store a pseudo-SSO encrypted token
Stores EncryptedString for 5 minutes and returns a new TokenId. Retrieve it with GET /pseudoSSO/{TokenId}. role_id is recorded in audit logs only; this handler does not check system-settings permissions. Not idempotent.
- Parameters:
role_id (str) – Amorphic role ID recorded in audit logs. Not used for authorization on this path. (required)
store_pseudo_sso_token_request (StorePseudoSSOTokenRequest) – (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: POST /pseudoSSO
Request¶
Request / response example
{
"EncryptedString": "AQICAHh...encrypted-blob"
}
Success (HTTP 200)¶
Token stored. Body is the new TokenId UUID. EncryptedString is not returned.
Request / response example
{
"TokenId": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
Errors¶
Documented error codes: IPV-1008, GE-1005, GE-1002, RTE-1001.
HTTP 400
Validation failure. Body is {“Message”: “<CODE> - <text>”}. Codes: IPV-1008 (EncryptedString missing or empty), GE-1005 (unsupported method).
EncryptedString missing or empty
{
"Message": "IPV-1008 - Invalid request body, missing key(s) - EncryptedString"
}
HTTP 500
DynamoDB put failure uses GE-1002. Other uncaught errors (including invalid JSON) return {“Message”: “<exception>”} with no RTE-1001 wrap.
DynamoDB put failed
{
"Message": "GE-1002 - Failed to store EncryptedString, please try again."
}
Uncaught handler failure
{
"Message": "Expecting value: line 1 column 1 (char 0)"
}