mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-07-27 15:54:16 +00:00
Completed OAuth change to make the use of the metadata URL setting exclusive to the authorization and token URL settings. If the former is defined, it will be used in preference to the latter.
This commit is contained in:
@@ -20,8 +20,6 @@ def oidc_oauth():
|
||||
'client_secret': Setting().get('oidc_oauth_secret'),
|
||||
'api_base_url': Setting().get('oidc_oauth_api_url'),
|
||||
'request_token_url': None,
|
||||
'access_token_url': Setting().get('oidc_oauth_token_url'),
|
||||
'authorize_url': Setting().get('oidc_oauth_authorize_url'),
|
||||
'client_kwargs': {'scope': Setting().get('oidc_oauth_scope')},
|
||||
'fetch_token': fetch_oidc_token,
|
||||
'update_token': update_token
|
||||
@@ -31,6 +29,9 @@ def oidc_oauth():
|
||||
|
||||
if isinstance(server_metadata_url, str) and len(server_metadata_url.strip()) > 0:
|
||||
authlib_params['server_metadata_url'] = server_metadata_url
|
||||
else:
|
||||
authlib_params['access_token_url'] = Setting().get('oidc_oauth_token_url')
|
||||
authlib_params['authorize_url'] = Setting().get('oidc_oauth_authorize_url')
|
||||
|
||||
oidc = authlib_oauth_client.register(
|
||||
'oidc',
|
||||
|
Reference in New Issue
Block a user