fix: correctly set up Client audience during OIDC dynamic registration

This commit is contained in:
Éloi Rivard 2023-12-23 19:37:14 +01:00
parent 0d4174de43
commit 521ed75f18
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
3 changed files with 7 additions and 0 deletions

View file

@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
Fixed
*****
- Correctly set up Client audience during OIDC dynamic registration.
[0.0.40] - 2023-12-22
=====================

View file

@ -400,6 +400,7 @@ class ClientRegistrationEndpoint(ClientManagementMixin, _ClientRegistrationEndpo
client = models.Client(
**self.client_convert_data(**client_info, **client_metadata)
)
client.audience = [client]
client.save()
return client

View file

@ -56,6 +56,7 @@ def test_client_registration_with_authentication_static_token(
assert client.token_endpoint_auth_method == "client_secret_basic"
assert client.logo_uri == "https://client.example.org/logo.webp"
assert client.jwks_uri == "https://client.example.org/my_public_keys.jwks"
assert client in client.audience
client.delete()