Skip to content

Commit

Permalink
feat: add downstream from fork (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
theexiile1305 committed Oct 23, 2023
1 parent ca72e91 commit 766e143
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
venv
.venv
.coverage
.vscode
14 changes: 9 additions & 5 deletions oidc/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ def get_authorize_params(self, state, redirect_uri):

class OIDCProvider(OAuth2Provider):
name = ISSUER
client_id = CLIENT_ID
client_secret = CLIENT_SECRET

def __init__(self, domain=None, domains=None, version=None, **config):
if domain:
Expand All @@ -59,16 +57,22 @@ def __init__(self, domain=None, domains=None, version=None, **config):
self.version = version
super().__init__(**config)

def get_client_id(self):
return CLIENT_ID

def get_client_secret(self):
return CLIENT_SECRET

def get_configure_view(self):
return OIDCConfigureView.as_view()

def get_auth_pipeline(self):
return [
OIDCLogin(self.client_id, domains=self.domains),
OIDCLogin(self.get_client_id(), domains=self.domains),
OAuth2Callback(
access_token_url=TOKEN_ENDPOINT,
client_id=self.client_id,
client_secret=self.client_secret,
client_id=self.get_client_id(),
client_secret=self.get_client_secret(),
),
FetchUser(
domains=self.domains,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sentry-auth-oidc-shib"
version = "1.0.0"
version = "2.0.0"
description = "OpenID Connect authentication provider for Sentry (Shibboleth)"
authors = ["Michael Fuchs <[email protected]>"]
license = "Apache 2.0"
Expand Down

0 comments on commit 766e143

Please sign in to comment.