-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Refactor Flemish government provider to support LeerID #5446
Draft
jorg-vr
wants to merge
13
commits into
main
Choose a base branch
from
feat/leer-id-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm not sure about the new name ACM-IDM, as the dash is not posible in variable names, and the abbreviation might not be well known. I am op to other suggestions. 'VlaamsOverheid' nor 'LeerID' seem broad enough as name. Edit: I opted for the name FlemishGovernment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds support for LeerID.
In order to add this support I refactored the existing OIDC omniauth strategy.
First of all I renamed this strategy to FlemishGovernment.
I did this rename as the strategy included a lot of Flemish government specific fixes. And other strategies that need OpenIDConnect, such as surf and elixir, extend from the OpenIDConnect strategy directly instead of from our specific OIDC version.
This rename allowed me to move the client_id and issuer from our database to our credentials.
It also removed the need for all the code that kept track of the provider id. Instead the provider is now based on the institution information like most other strategies. For LeerID I used the
ov_orgcode
for this. If this is not present it defaults to the Flemish government.This rename also results in the rename of the path, which should then also be updated by the flemish government.
I also simplified the code in the lib files to more closely match the structure used for Surf and Elixir. This makes them easier to compare and comprehend.
As we no longer overwrite the open_id_connect 'userinfo' method, an extra request is made to the userinfo endpoint of the flemish government. This is in line with the general specification, but not necessarily with the flemish government implementation.
As there was little documentation with the old implementation it is unclear if avoiding this extra request was intended behavior or an unintended side effect of the monkey patch.
Closes #4164