Native SSO Processing
This API should be called by the implementation of a token endpoint to generate the ID token and token response that comply with OpenID Connect Native SSO for Mobile Apps 1.0 (Native SSO) when Authlete’s /auth/token response indicates action = NATIVE_SSO (after you validate the session id and verify or generate the device secret as required by the flow). The token endpoint implementation should retrieve the value of action from the response and take the following steps according to the value.
OK
When the action is OK, it indicates that the /nativesso API processing has successfully completed. In this case, the token endpoint implementation should return a successful response (200 OK) to the client. The value of the responseContent property in the /nativesso API response can be used directly as the message body of the token response. Therefore, the success response can be constructed as follows:
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
(Embed the value of responseContent here.)
INTERNAL_SERVER_ERROR
When the action is INTERNAL_SERVER_ERROR, it indicates that something has gone wrong on the Authlete side. For example, an issue such as a database error might have occurred when retrieving the access token specified by the accessToken parameter from the database.
In such cases, the token endpoint implementation should return an error response to the client. The simplest implementation would be to return a 500 Internal Server Error.
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Cache-Control: no-store
(Embed the value of responseContent here.)
However, in a production environment, it may be better to return a more abstract error (one that does not directly describe the nature of the issue), rather than a 500 error.
CALLER_ERROR
When the action is CALLER_ERROR, it indicates that the issue lies with the caller of the API (i.e., the implementation of the OpenID Provider). For example, this could be due to missing a required parameter such as accessToken.
If CALLER_ERROR is returned, please review the implementation of your OpenID Provider.
Path parameters
A service ID.
Request body
Response
Native SSO processing completed successfully