View source: R/download_resources.R
fhir_authenticate | R Documentation |
This function is a wrapper to create an httr::Token object for authentication with OAuth2/OpenID Connect.
Internally, it calls httr::oauth_app()
, httr::oauth_endpoint()
and httr::oauth2.0_token()
to create a token that can
then be used in fhir_search.
fhir_authenticate(
secret,
key,
base_url,
access,
authorize,
query_authorize_extra = list()
)
secret |
The consumer/client secret, belonging to |
key |
Consumer key, also called client ID. For Keycloak this would for instance be the Keycloak client, e.g. "postman". |
base_url |
The URL the user will be redirected to after authorization is complete. This will usually be the base url of you FHIR server. |
access |
The url used to exchange unauthenticated for authenticated token.
This can be identical to |
authorize |
The url to send the client for authorization. |
query_authorize_extra |
A named list holding query parameters to append to initial auth page query. Could hold info about user identity and scope for keycloak like this: list(scope = "openid", grant_type = "password", username = "fhir-user", password = "fhirtest") |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.