Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Client Adapters

Keycloak has an extensive set of client adapters (libraries) for usage on various platforms and programming languages:

...

When the authentication is complete, the browser is redirected back to the given "redirect_uri" (which must be whitelisted in the Authorization Server) including a "code" as a request parameter. This code must be used when calling the token endpoint afterwards.

Example token exchange

Here is an example of the following POST request to the token-endpoint.obtain a context aware access token

Code Block
languagebash
titleAuthorization code exchange
POST /auth/realms/ehealth/protocol/openid-connect/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded

  grant_type=authorizationrefresh_codetoken&
  code=<code>&
  redirect_uri=https%3A%2F%2Fapp.mysite.org%2Fredirectrefresh_token=<refresh_token>&
  client_id=<client_id>&
  codeclient_verifiersecret=<secret><client_secret>

NOTE: For native apps the "redirect_uri" will be a URI with a custom scheme registered to the app on the device, for example "org.example.app://redirect/"The post parameters is to be expanded at a later time to include careteam-id, patient-id, etc.