Purpose
This method allows to find all the active authentication methods of the person (data is taken from person_authnetication_method by person_id)
Specification
...
|
Link | https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/persons/get-person-authentication-methods | Посилання на Apiary або Swagger | Resource | /api/persons/{{id}}/authentication_methods | Посилання на ресурс, наприклад: /api/persons/create | Scope | person:read | Scope для доступу | Components | Patient registry | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription | Microservices | API paragraph not found | Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC | Protocol type | REST | Тип протоколу, який використовується запитом, наприклад: SOAP | REST | Request type | GET | Тип запиту API, наприклад: GET, POST, PATCH… | Sync/Async | Sync | Метод є синхронним чи асинхронним? | Public/Private/Internal | Public | Потрібно зазначити тип методу за ступенем доступності |
|
Logic
API paragraph not found
Input parameters
Input parameter | Values | Type | Description | Example |
---|
id | | String | Required | 030d5c41-a945-41ac-89d1-b7c6d1c226c7 |
Request structure
API paragraph not found
Authorize
Verify the validity of access token
Check user scope person:read in order to perform this action
Наприклад:
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
api-key:uXhEczJ56adsfh3Ri9SUkc4en
Request data validation
Validate request
Validateperson_id
in request:
validate personvalidate person.id is id is UUID
search person by personby person.id in id in MPI
Authorize
...
Verify the validity of access token
...
Processing
Search person’s authentication methods
Search ACTIVE (ended_at > now) person auth methods using person_id in mpi.person_authentiocation_methods.
Don’t show info if auth_method.type = NA or auth_method.type = THIRD_PERSON and this THIRD_PERSON hasn't active auth method (type != NA and (ended_at > now or ended_at is NULL))
Response structure
Example:
Expand |
---|
title | Response example. Code: 200 |
---|
|
Code Block |
---|
{
"meta": {
"code": 200,
"url": "https://example.com/resource",
"type": "object",
"request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
},
"data": [
{
"id": "b94893f5-b66b-4431-b023-d5b5c037caef",
"type": "THIRD_PERSON",
"phone_number": "+38093*****85",
"value": "34d4aca0-ee15-4d2d-9ab8-336e5ba1f9c7",
"alias": "husband",
"ended_at": "2020-01-10 18:23:34.217335"
}
]
} |
|
Expand |
---|
title | Response example. Code: 403 |
---|
|
Code Block |
---|
{
"meta": {
"code": 403,
"url": "https://example.com/resource",
"type": "object",
"request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
},
"error": {
"type": "forbidden",
"message": "Such person not found"
}
} |
|
Post-processing processes
API paragraph not found
HTTP status codes
Page Properties |
---|
|
HTTP status code | Message | What caused the error |
---|
200 | Response | | 403 | Such person not found | | 422 | | Validation error |
|