Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenID Connect Dynamic Client Registration #707

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

azmeuk
Copy link
Collaborator

@azmeuk azmeuk commented Feb 19, 2025

This implements OpenID Connect Dynamic Client Registration and fixes #705.

Basically, a new claims class is created at authlib/oidc/registration/claims.py with all the missing claims.
On the same time I have tuned RegistrationEndpoint so it can handle several claims at the same time (this is also in prevision of #500 and the additional post_logout_redirect_uris registration claim).

Here is how one can use OIDC Dynamic Client Registration:

    from authlib.oauth2.rfc7591 import ClientMetadataClaims as OAuth2ClientMetadataClaims
    from authlib.oauth2.rfc7591 import ClientRegistrationEndpoint
    from authlib.oidc.registration import ClientMetadataClaims as OIDCClientMetadataClaims

    class MyClientRegistrationEndpoint(ClientRegistrationEndpoint):
        ...

        def get_server_metadata(self):
            ...

    authorization_server.register_endpoint(
        MyClientRegistrationEndpoint(
            claims_classes=[OAuth2ClientMetadataClaims, OIDCClientMetadataClaims]
        )
    )

@lepture
Copy link
Owner

lepture commented Feb 20, 2025

LGTM

@lepture lepture merged commit 7ab1927 into lepture:main Feb 20, 2025
9 of 10 checks passed
@azmeuk azmeuk deleted the 705-oidc-registration branch February 20, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for OpenID Connect Dynamic Client Registration
2 participants