Problem/Motivation
In #3238067-2: gsislogin project open to new maintainer applications on 5 Oct, 2021 I had introduced some hooks I would like to add to the module code:
- hook_gsislogin_failure_redirect_url_alter(): Alters the url to redirect upon GSIS failure.
- hook_gsislogin_success_redirect_url_alter(): Alters the url to redirect upon GSIS success login/registration.
- hook_gsislogin_redirect_uri_query_alter(): Allows modules to change the redirect uri's query parameters.
- hook_gsislogin_user_exists(): Allows modules to say if the user with the provided details exists.
- hook_gsislogin_user_create(): Allows modules to say if the user with the provided data should be created.
- hook_gsislogin_user_module_alter(): Allows modules to change the namespace used for the external login.
- hook_gsislogin_create_user_details(): Allows modules to act upon a user created/logged-in (eg. if user is authenticated, also gets the role with rid
X).
The concept is to allow other modules to provide custom authentication forms or links to the /gsis login page so that, upon return from GSIS, the user gets created with a specific role. This of course could be expanded more as a feature, by allowing other modules to add extra query parameters and use them again upon return.
PS: Some of the hooks above might not be needed anymore in D8+, due to events handling for request data etc. We will see how it goes...
Remaining tasks
Add the hooks to the code.
User interface changes
None
API changes
Hooks to be added. Nothing breaking backwards-compatibility.
Issue fork gsislogin-3427100
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
thanos ntelis commentedComment #5
vensires@thanos-ntelis what's the status of this MR? I still see some TODO comments in the code.
Comment #6
thanos ntelis commentedComment #8
vensires