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

Add basic OpenID Connect support #533

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add basic OpenID Connect support #533

wants to merge 2 commits into from

Conversation

Jamie0
Copy link

@Jamie0 Jamie0 commented Sep 13, 2019

This PR adds bare bones OAuth 2.0 support by implementing an OpenID Connect client.

To authenticate via OpenID, navigate to /login/openid. This PR also provides an option to always use OpenID (overridable by navigating to /login/internal), which enterprise users may find useful.

The extension can be configured with the following environmental variables:

OPENID_CONNECT_URL="https://sso.cor.insanityradio.com"
OPENID_CONNECT_CONFIGURATION="default"
OPENID_CONNECT_CLIENT_ID="polr"
OPENID_CONNECT_CLIENT_SECRET="xxxxx"
OPENID_CONNECT_ADMIN_GROUP="comma,separated,list"

Resolves #495

@Jamie0 Jamie0 marked this pull request as ready for review September 15, 2019 11:14
@@ -34,6 +37,79 @@ public function performLogoutUser(Request $request) {
return redirect()->route('index');
}

public function performOpenIDConnect(Request $request) {

Choose a reason for hiding this comment

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

@Jamie0 I would suggest a more agnostic approach here. For example, I would add a factory and strategy pattern here to determine the authentication system based on the configuration.

I would suggest adding an additional env var to determine which Authentication system to use. Ex, default, openid, oauth2.0. This way, you can check which authentication system is configured and then instantiate the respective strategy for authenticating.

@TheCataliasTNT2k
Copy link

Is this still active? @Jamie0

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.

[Feature Request] OAuth login
3 participants