Access to Koppeltaal

Request Flow

circle-info

For an interactive demo, go to our Koppeltaal Test Toolingarrow-up-right.

Koppeltaal requires that applications use the SMART Backend Services: Authorizationarrow-up-right flow to request an access_token. The following diagram is used for this purpose

SMART Backend auth flow
circle-info

The contents of the JWT and the OAuth request are described in detail herearrow-up-right. Koppeltaal has an exception to the scope parameter. It may be sent by the client, but its value is set by the auth server based on the client's role.

circle-exclamation

1. JWT creation

The above diagram shows that a JWT token is first compiled and signed. The following fields must be set:

Field
Value

iss

Fill with the client_id value provided while Joining a domain

sub

Fill with the client_id value provided while Joining a domain

exp

UNIX timestamp of now + 5 minutes

jti

Random identifier, this is used by the auth server to prevent replay attacks. Use something like a GUID here.

2. Access Token Request

Execute the following request:

Request access_token

POST https://auth-service.koppeltaal.headease.nl/oauth2/token

See the Response tab for an example response.

Headers

Name
Type
Description

Content-Type*

string

application/x-www-form-urlencoded

Request Body

Name
Type
Description

client_assertion*

string

The signed JWT

client_assertion_type*

string

Always fill with

urn:ietf:params:oauth:client-assertion-type:jwt-bearer

grant_type*

string

Always fill with

client_credentials

scope*

string

Content can be empty. The

scope

is set by the auth server based on the client's role

As shown above in the 200 Response, the access_token is passed as part of the response. This access_token must be passed along as a Bearer token in the Authorization headerarrow-up-right on every request to the Koppeltaal server. The format of the header is as follows:

In the example response, the header should look like this:

Refreshing the access_token

The access_token has a relatively short lifetime. When the token expires, the Koppeltaal server will return a 401 error. The SMART Backend Services: Authorizationarrow-up-right does not support a refresh_token. The application needs to redo steps 1 & 2.

Topics

TOP-KT-005c - Applicatie toegang: SMART on FHIR backend servicesarrow-up-right

Last updated