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

OIDC: Refactor to expose OIDC client object #971

Merged
merged 1 commit into from
Aug 19, 2024
Merged

Conversation

psrok1
Copy link
Member

@psrok1 psrok1 commented Aug 19, 2024

Your checklist for this pull request

  • I've read the contributing guideline.
  • I've tested my changes by building and running the project, and testing changed functionality (if applicable)
  • I've added automated tests for my change (if applicable, optional)
  • I've updated documentation to reflect my change (if applicable)

Description of changes

I don't really like the documentation of authlib and the current design of mixins. That's why I think it's a bit unsafe to mix with OAuth2Session and it's much better to make a wrapper that will be exposed via OpenIDProvider.get_oidc_client method.

Additional thing is that in future PRs we need to make a series of calls to the provider using fetched access token, we can't do that with current _get_client method that creates OpenIDSession object internally and disposes it right after the call.

The third thing is that we need to strip OpenIDClient methods from unused code paths, copied from OpenIDMixin.

Test plan

Right now it needs to be tested manually using docker-compose-oidc-dev

@psrok1 psrok1 merged commit 2723ff9 into master Aug 19, 2024
12 checks passed
@psrok1 psrok1 deleted the refactor/oidc-client branch August 19, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant