# 2. Token request verzender

Relevante TA Notified Pull hoofdstukken

* 3.2 Resource server authorization: OAuth 2.0
* Appendix: Examples

## Voorbeeldbericht

Velden voor de tokenaanvraag zullen gevuld worden volgens de TA Notified Pull. Binnen de client en authorization assertions houdt VIPLive voor bepaalde velden een standaard vulling aan.

Voor een volledig voorbeeld van een tokenaanvraag zie *Appendix: Examples* in de TA Notified Pull.

### Client assertion

Vulling van de header en payload zal zijn volgens de TA Notified Pull, zoals beschreven in hoofdstuk 3.2.1. Voor onderstaande velden kan de volgende vulling worden verwacht:

<table><thead><tr><th width="91">Veld</th><th>Vulling VIPLive</th></tr></thead><tbody><tr><td>alg</td><td>PS256</td></tr><tr><td>iss</td><td><ul><li><strong>Test</strong> : <a href="https://fhir.test-datakluis.shared.topicuszorg.nl/">https://fhir.test-datakluis.shared.topicuszorg.nl</a></li><li><strong>Acc</strong>: <a href="https://fhir.acceptatie-datakluis.shared.topicuszorg.nl/">https://fhir.acceptatie-datakluis.shared.topicuszorg.nl</a></li><li><strong>Prod</strong>: <a href="https://fhir.datakluis.shared.topicuszorg.nl/">https://fhir.datakluis.shared.topicuszorg.nl</a></li></ul></td></tr><tr><td>aud</td><td>Token endpoint van de ontvangende partij (zie <a data-mention href="/pages/5asAms3VB4Bvsp86w6bL">/pages/5asAms3VB4Bvsp86w6bL</a>)</td></tr><tr><td>sub</td><td><code>viplive-databroker</code></td></tr></tbody></table>

#### Voorbeeld client assertion

```
{
    "kid": "b6672857bc46214ec6840efa048787dfc2948ada-PS256",
    "typ": "JWT",
    "alg": "PS256"
}
.{
    "aud": "ontvanger.nl/token",
    "sub": "viplive-databroker",
    "iss": "https://fhir.test-datakluis.shared.topicuszorg.nl",
    "exp": 1734619249,
    "iat": 1734619244,
    "jti": "46dfde7c-5e8c-4838-abd7-220bd38c2fd8"
}
```

### Authorization assertion

Vulling van de header en payload zal zijn volgens de TA Notified Pull, zoals beschreven in hoofdstuk 3.2.2. Voor onderstaande velden kan de volgende vulling worden verwacht:

<table><thead><tr><th width="199">Veld</th><th>Vulling VIPLive</th></tr></thead><tbody><tr><td>alg</td><td>PS256</td></tr><tr><td>iss</td><td><ul><li><strong>Test</strong> : <a href="https://fhir.test-datakluis.shared.topicuszorg.nl/">https://fhir.test-datakluis.shared.topicuszorg.nl</a></li><li><strong>Acc</strong>: <a href="https://fhir.acceptatie-datakluis.shared.topicuszorg.nl/">https://fhir.acceptatie-datakluis.shared.topicuszorg.nl</a></li><li><strong>Prod</strong>: <a href="https://fhir.datakluis.shared.topicuszorg.nl/">https://fhir.datakluis.shared.topicuszorg.nl</a></li></ul></td></tr><tr><td>aud</td><td>Token endpoint van de ontvangende partij (zie <a data-mention href="/pages/5asAms3VB4Bvsp86w6bL">/pages/5asAms3VB4Bvsp86w6bL</a>)</td></tr><tr><td>sub</td><td>OID van de AGB-code van verzendende zorgaanbieder</td></tr><tr><td>user_id</td><td>Geen vulling</td></tr><tr><td>user_role</td><td>Geen vulling</td></tr><tr><td>authorizer</td><td><strong>Ontvanger is een zorgaanbieder binnen het systeem:</strong>  OID van de AGB-code van de ontvangende zorgaanbieder.<br><br><strong>Ontvanger is het systeem:</strong> Veld wordt weggelaten.</td></tr><tr><td>authorization_base</td><td>Geen vulling in tokenaanvraag<br><em>(Vanuit VIPLive komt deze mee met de Notify)</em></td></tr><tr><td>patient</td><td>OID van een BSN, mits het ontvangende systeem gerechtigd is deze te verwerken</td></tr></tbody></table>

#### Voorbeeld authorizarion assertion

```
{
    "kid": "b6672857bc46214ec6840efa048787dfc2948ada-PS256",
    "typ": "JWT",
    "alg": "PS256"
}
.{
    "aud": "ontvanger.nl/token",
    "sub": "2.16.840.1.113883.2.4.6.1.12345678",
    "authorization_base": "5754d12a-bfb0-4e3f-847a-9460b45f3a92",
    "authorizer": "2.16.840.1.113883.2.4.6.1.44446666",
    "patient": "urn:oid:2.16.840.1.113883.2.4.6.3.999999151",
    "iss": "https://fhir.test-datakluis.shared.topicuszorg.nl",
    "exp": 1734619249,
    "iat": 1734619244,
    "jti": "b7f219b7-baae-4af5-8501-f027f32843bd"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://viplive-interop.gitbook.io/viplive-notified-pull/notified-pull/2.-token-request-verzender.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
