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.
With OIDC
.well-knownnow available on Leap, we should simplify/generalize some auth URL resolvers:dwave-cloud-client/dwave/cloud/auth/flows.py
Lines 309 to 329 in d9c0dbf
Note: consider caching the configuration and/or individual auth URLs.