open-forms-ext-token-exchange 0.4.0

Creator: codyrutscher

Last updated:

Add to Cart

Description:

openformsexttokenexchange 0.4.0

Version:
0.4.0
Source:
https://github.com/open-formulieren/open-forms-ext-token-exchange

Keywords:
Open Forms Extension, Keycloak token exchange




Open Forms extension to use Keycloak access tokens when requesting prefill data from external APIs.

Contents

1 Features
2 Installation
3 Usage
4 Configuration



1 Features

Signal receiver which extracts the Keycloak access token from the session and caches it.
Pre-request hook that adds a custom authentication class to the request kwargs.
Custom authentication class that performs the token exchange with Keycloak and adds the exchanged token to the Authorization header.


Note
The token exchange has a standard, but Keycloak mentions in its documentation that they
“extended it a little, ignored some of it, and loosely interpreted other parts of the specification”.



2 Installation
Requirements

Python 3.7 or above
setuptools 30.4.0 or above
Django 3.2



3 Usage
For an explanation of this how this extension works, look at the Open Forms developer documentation.
To see how to build and distribute an image with this extension, look at the Open Forms documentation about
building and distributing extensions.


4 Configuration
In the Open Forms Admin, go to Miscellaneous > Token exchange plugin configurations.
Click on Add Token exchange plugin configuration and fill in the details:

Select the service for which you want the token authorisation to be performed.
Add the Keycloak audience.

Save the configuration.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.