mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-04-21 19:08:53 +00:00
Updated the OAuth service providers to properly respect the new OAuth auto-configuration settings for each provider. (#1527)
This commit is contained in:
commit
84f84f2809
@ -24,9 +24,10 @@ def azure_oauth():
|
|||||||
'fetch_token': fetch_azure_token,
|
'fetch_token': fetch_azure_token,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto_configure = Setting().get('azure_oauth_auto_configure')
|
||||||
server_metadata_url = Setting().get('azure_oauth_metadata_url')
|
server_metadata_url = Setting().get('azure_oauth_metadata_url')
|
||||||
|
|
||||||
if isinstance(server_metadata_url, str) and len(server_metadata_url.strip()) > 0:
|
if auto_configure and isinstance(server_metadata_url, str) and len(server_metadata_url.strip()) > 0:
|
||||||
authlib_params['server_metadata_url'] = server_metadata_url
|
authlib_params['server_metadata_url'] = server_metadata_url
|
||||||
else:
|
else:
|
||||||
authlib_params['access_token_url'] = Setting().get('azure_oauth_token_url')
|
authlib_params['access_token_url'] = Setting().get('azure_oauth_token_url')
|
||||||
|
@ -26,9 +26,10 @@ def github_oauth():
|
|||||||
'update_token': update_token
|
'update_token': update_token
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto_configure = Setting().get('github_oauth_auto_configure')
|
||||||
server_metadata_url = Setting().get('github_oauth_metadata_url')
|
server_metadata_url = Setting().get('github_oauth_metadata_url')
|
||||||
|
|
||||||
if isinstance(server_metadata_url, str) and len(server_metadata_url.strip()) > 0:
|
if auto_configure and isinstance(server_metadata_url, str) and len(server_metadata_url.strip()) > 0:
|
||||||
authlib_params['server_metadata_url'] = server_metadata_url
|
authlib_params['server_metadata_url'] = server_metadata_url
|
||||||
else:
|
else:
|
||||||
authlib_params['access_token_url'] = Setting().get('github_oauth_token_url')
|
authlib_params['access_token_url'] = Setting().get('github_oauth_token_url')
|
||||||
|
@ -25,9 +25,10 @@ def google_oauth():
|
|||||||
'update_token': update_token
|
'update_token': update_token
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto_configure = Setting().get('google_oauth_auto_configure')
|
||||||
server_metadata_url = Setting().get('google_oauth_metadata_url')
|
server_metadata_url = Setting().get('google_oauth_metadata_url')
|
||||||
|
|
||||||
if isinstance(server_metadata_url, str) and len(server_metadata_url.strip()) > 0:
|
if auto_configure and isinstance(server_metadata_url, str) and len(server_metadata_url.strip()) > 0:
|
||||||
authlib_params['server_metadata_url'] = server_metadata_url
|
authlib_params['server_metadata_url'] = server_metadata_url
|
||||||
else:
|
else:
|
||||||
authlib_params['access_token_url'] = Setting().get('google_token_url')
|
authlib_params['access_token_url'] = Setting().get('google_token_url')
|
||||||
|
@ -25,9 +25,10 @@ def oidc_oauth():
|
|||||||
'update_token': update_token
|
'update_token': update_token
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto_configure = Setting().get('oidc_oauth_auto_configure')
|
||||||
server_metadata_url = Setting().get('oidc_oauth_metadata_url')
|
server_metadata_url = Setting().get('oidc_oauth_metadata_url')
|
||||||
|
|
||||||
if isinstance(server_metadata_url, str) and len(server_metadata_url.strip()) > 0:
|
if auto_configure and isinstance(server_metadata_url, str) and len(server_metadata_url.strip()) > 0:
|
||||||
authlib_params['server_metadata_url'] = server_metadata_url
|
authlib_params['server_metadata_url'] = server_metadata_url
|
||||||
else:
|
else:
|
||||||
authlib_params['access_token_url'] = Setting().get('oidc_oauth_token_url')
|
authlib_params['access_token_url'] = Setting().get('oidc_oauth_token_url')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user