mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-04 19:15:30 +00:00
Updated the OAuth service providers to properly respect the new OAuth autoconfiguration settings for each provider.
This commit is contained in:
parent
8108caf96a
commit
d7f3610b51
@ -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…
Reference in New Issue
Block a user