Skip to main content

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

Project description

Version:
0.4.0
Source:

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

Keywords:

Open Forms Extension, Keycloak token exchange

Build status Code quality checks black Coverage status

python-versions django-versions pypi-version

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

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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open-forms-ext-token-exchange-0.4.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file open-forms-ext-token-exchange-0.4.0.tar.gz.

File metadata

File hashes

Hashes for open-forms-ext-token-exchange-0.4.0.tar.gz
Algorithm Hash digest
SHA256 30f1408bee02091548e1c875159a211769d38f179987da668064fb058ae3eb7b
MD5 3be62173f3452d09a699e7daeb32add9
BLAKE2b-256 ed6f6a335084e628e793335cd2c1ef4c5a71f6eb2b6720d68ed023011eaef4a3

See more details on using hashes here.

File details

Details for the file open_forms_ext_token_exchange-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for open_forms_ext_token_exchange-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3853a8885fd809e2ba505a241733e864783d0365281f3472848ee6011890f32
MD5 062260fb04adc3557bbdbbbf22ec2796
BLAKE2b-256 244688f9da8bbe1db9170e44fe9aa63a1ec49447413fb8d7ffab6831b52d0bbe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page