Supported only in Gematik Authenticator version above 4.6.0 via the authenticator://
Authenticator Url's with
Authentication Flow
set to Authentication with a single Gematik-Authenticator request.
- User initiated login
- User selects the
Login with HBA
, which triggers the gematik-idp - First call to Keycloak, initiating the IDP flow
- Keycloak fetches the openid-configuration from C-IDP: example configuration
- C-IDP responds with the openid-configuration as JWS
- Keycloak verifies the JWS and extracts the following claims:
- issuer
- authorization_endpoint
- token_endpoint
- jwks_uri
- uri_puk_idp_enc
- uri_puk_idp_sig
- exp (expiration time)
- After fetching the config, Keycloak redirects the user to /startAuth
- /startAuth is called from the browser
- Keycloak generates
code_verifier
and stores it in the session of the user - Generate the deeplink to the Authenticator, passing among other things
- challenge_path: url to the C-IDP
- Containing a field name
cardType
set to HBA
- Containing a field name
- redirect_url: url to Keycloak
- code_challenge: generated
code_verifier
- challenge_path: url to the C-IDP
- User opens Authenticator app
- Authenticator app automatically starts HBA flow with the IDP
- Browser pulls the authentication status repeatedly, while waiting for the exchange between Gematik-Authenticator and Keycloak to complete
- Authenticator app and C-IDP communicate, exchanging certificates and HBA data
- Authenticator calls
redirect_url
- Keycloak responds with 200 and saves the HBA data
- Keycloak fetches certificate from C-IDP
- C-IDP returns certificate
- Keycloak generates
key_verifier
with the certificate andcode_verifier
from user session - Call to C-IDP to retrieve ID-token
- Responds with json, which contains id_token and access_token as JWE
- Keycloak decrypts id_token, verifies it and stores HBA data in the session
- Keycloak responses status call from step 12 with 200 and provides the URL to the next step.
- User browser calls
nextStepUrl
from the status response - Keycloak updates the user, based on IDP-mapper with the stored HBA
- Keycloak calls initial redirect_url
- Return the user to the initial application