Get auth token
Authorization
The fhir endpoint follows OAuth client-credentials flow where an incoming request is authorised based on the token it carries in the Authorisation header.
How to obtain access token
Obtain an access token using the below curl command.
curl -ik 'https://$D2E__PUBLIC__FQDN/oauth/token' \
--header 'accept: application/json, text/javascript, */*; q=0.01' \
--header 'content-type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode "client_id=$LOGTO__D2E_DATA__CLIENT_ID" \
--data-urlencode "client_secret=$LOGTO__D2E_DATA__CLIENT_SECRET"
Replace
D2E__PUBLIC__FQDNwith- localhost:41100 - local workstation
- FQDN - remote server
LOGTO__D2E_DATA__CLIENT_IDwith the value from .env fileLOGTO__D2E_DATA__CLIENT_SECRETwith the value from .env file
Older installations may use the previous names LOGTO__ALP_DATA__CLIENT_ID and LOGTO__ALP_DATA__CLIENT_SECRET instead. From v0.19, trex issues the token for this client, whichever identity provider mode is used.