Table of Contents |
---|
...
This method allows to find all the active person's authentication methods. Any user with appropriate scope can read information about authentication method of the person (data is taken from person_authnetication_method by person_id).
Specification
Page Properties | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
Logic
API paragraph not foundService returns primary authentication method for person or for confident person if type of authentication method = 'THIRD_PERSON':
Get authentication method by person_id from person_authentication_methods where updated_at is the newest
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
id | String | Required | 030d5c41-a945-41ac-89d1-b7c6d1c226c7 |
Dictionaries
AUTHENTICATION_METHOD
Request structure
API paragraph not foundSee on Apiary
Authorize
Verify the validity of access tokenCheck user scope person:read
Return (401, 'Invalid access token') in case of validation fails
Verify that token is not expired
in case of error - return (401, 'Invalid access token')
Check user scopes in order to perform this action (scope = 'person:read')
Headers
Наприклад:
Return (403, 'Your scope does not allow to access this resource. Missing allowances: person:read ') in case of invalid scope(s)
Headers
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9api{{access_token}}
Api-key:uXhEczJ56adsfh3Ri9SUkc4en{{secret}}
Request data validation
Validate
...
User
...
Extract user_id
...
validate person.id is UUID
in case error return 422
search person by person.id in MPI
in case error return 422, "such person doesn't exist"
Processing
Search person’s authentication methods
Search ACTIVE (ended_at > now) person auth methods using person_id in mpi.person_authentiocation_methods.
...
from token.
Validate Patient
Get person_id from URL
Validate patient status is active (status = ‘active' & is_active = 'true’)
in case of error - return 404 ('not found')
Response structure
Example:
...
Expand | ||
---|---|---|
| ||
|
...
API paragraph not found
HTTP status codes
Page Properties | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
|