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

Define "generic" OpenID Connect init view #100

Merged
merged 7 commits into from
May 16, 2024

Conversation

sergei-maertens
Copy link
Member

Part of #99

This is a port of the digid_eherkenning_oidc_generics package in Open Forms, after its refactor.

The approach taken there is more generic than just DigiD/eHerkenning and is useful for our "main" OIDC library.

Authentication backend + callback view will follow in separate PRs.

Copy link
Collaborator

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just one very minor question regarding request usage. Also happy to have the tests for the init flow in the library now :)

One thing I was wondering: will this refactor require any changes on the side of the projects that use this library for the simple OIDC admin login flow (i.e. Open Zaak) or will the usage stay the same for those cases?

mozilla_django_oidc_db/views.py Outdated Show resolved Hide resolved
@sergei-maertens
Copy link
Member Author

One thing I was wondering: will this refactor require any changes on the side of the projects that use this library for the simple OIDC admin login flow (i.e. Open Zaak) or will the usage stay the same for those cases?

There should not be any impact! If there is, it's a bug.

Ported the refactor from Open Forms.

The library now ships an OIDCInit view that can handle multiple config
classes (and in the future: instances of a single model), which all
have tailored behaviours. The default AuthenticationRequestView is
now 'just a flavour' of this generic behaviour.

We track some additional state and perform additional redirect URL
validation for those situations where stricter behaviour of the
OIDC flow is desired.
@sergei-maertens sergei-maertens merged commit ddc1100 into master May 16, 2024
9 checks passed
@sergei-maertens sergei-maertens deleted the feature/99-oidc-init-view branch May 16, 2024 09:59
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.

2 participants