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

Use OIDC well-known configuration #672

Open
randomir opened this issue Oct 7, 2024 · 0 comments
Open

Use OIDC well-known configuration #672

randomir opened this issue Oct 7, 2024 · 0 comments
Labels

Comments

@randomir
Copy link
Member

randomir commented Oct 7, 2024

With OIDC .well-known now available on Leap, we should simplify/generalize some auth URL resolvers:

# note: in the future we might want to replace these url resolvers with a
# OpenID Provider Metadata server query
@staticmethod
def _infer_auth_endpoint(leap_api_endpoint: str) -> str:
return urljoin(leap_api_endpoint, '/leap/openid/authorize')
@staticmethod
def _infer_token_endpoint(leap_api_endpoint: str) -> str:
return urljoin(leap_api_endpoint, '/leap/openid/token')
@staticmethod
def _infer_revocation_endpoint(leap_api_endpoint: str) -> str:
return urljoin(leap_api_endpoint, '/leap/openid/revoke_token/')
@staticmethod
def _infer_leap_success_uri(leap_api_endpoint: str) -> str:
return urljoin(leap_api_endpoint, '/leap/openid/success/')
@staticmethod
def _infer_leap_error_uri(leap_api_endpoint: str) -> str:
return urljoin(leap_api_endpoint, '/leap/openid/error/')

Note: consider caching the configuration and/or individual auth URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant