HelseID Authorization
In order to be authorized to use the Pasientens Rekvisisjoner API, the client must first be authenticated using HelseID. For more information on how to register a client with HelseID, see Selvbetjening (selvbetjening.nhn.no).
A DPoP token from HelseID is required for authorization of organization and health care personnel. See HelseID's documentation on DPoP.
Note: For testing, you can use HelseID's Test Token Tool to generate DPoP credentials accepted only by the test environment.
Claims
| Name | Value/Description | Type |
|---|---|---|
Audience |
nhn:parek |
|
Scope |
nhn:parek/rekvisisjon |
|
orgnr_parent |
Organisation number of the main unit. | Client claim |
orgnr_child |
Organisation number of requesting unit under the main unit. | Client claim |
client_name |
Name of the connecting client. | Client claim |
pid |
National identity number (birth number) of the requester. | User claim |
hpr_number |
Health personnel number according to NHN’s coding standard. | User claim |
security_level |
Security level of the given user (level 4 is required for this service). |
User claim |
More information about HelseID claims can be found in HelseID's claims documentation.
Headers
Once a DPoP token and proof are obtained from HelseID, include them in the Authorization and DPoP headers when sending requests to the PaRek API like so:
Authorization: DPoP <helseid-dpop-token>
DPoP: <helseid-dpop-proof>
...other headers...
More details on headers sent to the PaRek API can be found on the API usage page.
Planned: M2M (Machine to Machine)-Authentication
M2M-authentication is not yet implemented, but it is a planned form of authentication for applications operating not on behalf on any user. Authenticated machines will be allowed to call a small number of planned endpoints that do not communicate sensitive health data.
See planned endpoints for more information about these endpoints.