feat: XOAUTH2 hooks for OIDC authentication#65
Open
jcdelepine wants to merge 1 commit into
Open
Conversation
Adds OIDC/XOAUTH2 hook examples to hooks.php.dist: - imap_preauthenticate: injects a Horde_Imap_Client_Password_Xoauth2 object when the user has OAuth2 tokens stored, falling back to password auth otherwise. - dynamic_prefs: proactively refreshes OAuth2 tokens before they expire during a session, and updates the IMAP password stored in the Horde session so active connections use the new token. Also relaxes the credential check in IMP_Auth to accept either a password or a xoauth2_token, allowing OIDC sessions to authenticate without a stored password. All hook code is commented out in the .dist file and must be explicitly activated by the administrator. Depends on: - horde/Core: OIDC integration (PR #160)
This file contains hidden or 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
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.
Adds OIDC/XOAUTH2 hook examples to hooks.php.dist:
imap_preauthenticate: injects a Horde_Imap_Client_Password_Xoauth2 object when the user has OAuth2 tokens stored, falling back to password auth otherwise.
dynamic_prefs: proactively refreshes OAuth2 tokens before they expire during a session, and updates the IMAP password stored in the Horde session so active connections use the new token.
Also relaxes the credential check in IMP_Auth to accept either a password or a xoauth2_token, allowing OIDC sessions to authenticate without a stored password.
All hook code is commented out in the .dist file and must be explicitly activated by the administrator.
Depends on: