Skip to content

Commit

Permalink
Make SSO Provider configurable via .env; remove stale variables
Browse files Browse the repository at this point in the history
  • Loading branch information
yasiupl committed Jul 8, 2024
1 parent 8b596ea commit dfb92a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions whois/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@

oidc_enabled = True
# OAuth settings
SSO_PROVIDER = os.environ.get("OAUTH_PROVIDER")
SSO_CLIENT_ID = os.environ.get("OAUTH_CLIENT_ID")
SSO_CLIENT_SECRET = os.environ.get("OAUTH_CLIENT_SECRET")
SSO_AUTH_URL = os.environ.get("OAUTH_AUTH_URL")
SSO_TOKEN_URL = os.environ.get("OAUTH_TOKEN_URL")
SSO_USERINFO_URL = os.environ.get("OAUTH_USERINFO_URL")

# production
ip_mask = "192.168.88.1-255"
Expand Down
2 changes: 1 addition & 1 deletion whois/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
oauth = OAuth(app)
oauth.register(
"sso",
server_metadata_url="http://sso.hsp.sh/auth/realms/hsp/.well-known/openid-configuration",
server_metadata_url=settings.SSO_PROVIDER,
client_kwargs={"scope": "openid profile email"},
)

Expand Down

0 comments on commit dfb92a0

Please sign in to comment.