Skip to main content

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

Project description

Version:
0.2.0
Source:

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

Keywords:

Open Forms Extension, Keycloak token exchange

PythonVersion:

3.8

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.3.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.2.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for open-forms-ext-token-exchange-0.2.0.tar.gz
Algorithm Hash digest
SHA256 60ab3aa1624230d6c18eb53b63075ceea5d877c6551c8b1e6f9bb1dae1a3c9a8
MD5 c33e1d182257fb01f44def011e5c2d1f
BLAKE2b-256 2a2cfe2a470b48310663bc68c0fb314079790c35d2ab3b57c2529651bbbb0c8f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for open_forms_ext_token_exchange-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 905b4aa4d5f4d3e5f826db54cfa91bbd8c17fc4d54d163048dc229d716b70474
MD5 609c070517c89225d24673bdc74202c4
BLAKE2b-256 8aab3bb772c25c9bfec38df4ecf57c729085bc2a48be6a5182f9c02387ad6ae2

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