v1
latestOpenAPI 3.0.02026-07-14307078.8 KBResponse to user authentication initialization from HIP
If the patient's id is valid, CM will return a transactionId as initialization of user auth. If the request is valid, then 'auth.mode' will convey how the authentication should be done. The authentication can be mediated or direct. For mediated authentication modes, HIP or HIU is epected to send over relevant code (OTP/token) or demographic info via subsequent API call to /auth/confirm. for direct authentication case, CM will notify requester through/users/auth/notify API.
- auth.mode conveys whats the mode of authentication is, and what is expected from HIP/HIU in the subsequent /auth/confirm API call. Possible values
- MOBILE_OTP - auth via OTP to registered mobile. Mediated.
- AADHAAR_OTP - auth initiated with Aadhaar with OTP. Mediated.
- DEMOGRAPHICS - auth initiated with demographic verification
- DIRECT - for authentication directly with the patient. e.g. Mobile App, SMS. In this case, the HIP/HIU is not expected to call subsequent /auth/confirm call. CM will do direct authentication with the User (e.g. Mobile App, SMS etc) and will notify requester
- meta.expiry conveys the expiry time of the token and the authentication session
- NOTE, only one of X-HIP-ID or X-HIU-ID will be sent as part of header, not both.
The error section in the body, represents the potential errors that may have occurred. Possible reasons:
- Patient id is invalid
Headers
Access token which was issued after successful login with gateway auth server, which will be sent by gateway to authenticate itself with API bridge.
Identifier of the health information provider to which the request was intended.
Identifier of the health information user to which the request was intended.
Request body
Example request
{
"auth": {
"meta": {
"expiry": "2019-12-30T12:01:55Z"
}
},
"requestId": "5f7a535d-a3fd-416b-b069-c97d021fbacd"
}Response
Request accepted