POST v1/Token/Amplify/Authenticate
Authenticates an Amplify user via Cognito token and returns a Midnight access/refresh token
Request Information
URI Parameters
None.
Body Parameters
The request containing Amplify JWT access token and domain
AmplifyTokenRequestName | Description | Type | Additional information |
---|---|---|---|
Domain | string |
None. |
|
Token | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "Domain": "sample string 1", "Token": "sample string 2" }
application/xml, text/xml
Sample:
<AmplifyTokenRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Domain>sample string 1</Domain> <Token>sample string 2</Token> </AmplifyTokenRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
Returns MidnightAuthResponse with access and refresh tokens
MidnightAuthResponseName | Description | Type | Additional information |
---|---|---|---|
access_token |
Returns Access Token |
string |
None. |
refresh_token |
Returns Refresh Token |
string |
None. |
token_type |
Returns Token Type |
string |
None. |
expires_in |
Returns Token Expire Time |
integer |
None. |
Response Formats
application/json, text/json
Sample:
{ "access_token": "sample string 1", "refresh_token": "sample string 2", "token_type": "sample string 3", "expires_in": 4 }
application/xml, text/xml
Sample:
<MidnightAuthResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <access_token>sample string 1</access_token> <refresh_token>sample string 2</refresh_token> <token_type>sample string 3</token_type> <expires_in>4</expires_in> </MidnightAuthResponse>