mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-07-20 12:06:59 +00:00
Update DashboardOIDC.py
This commit is contained in:
parent
08a41f8f68
commit
2987216169
@ -9,7 +9,7 @@ class DashboardOIDC:
|
|||||||
ConfigurationPath = os.getenv('CONFIGURATION_PATH', '.')
|
ConfigurationPath = os.getenv('CONFIGURATION_PATH', '.')
|
||||||
ConfigurationFilePath = os.path.join(ConfigurationPath, 'wg-dashboard-oidc-providers.json')
|
ConfigurationFilePath = os.path.join(ConfigurationPath, 'wg-dashboard-oidc-providers.json')
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.providers: dict[str, dict] = None
|
self.providers: dict[str, dict] = {}
|
||||||
self.__default = {
|
self.__default = {
|
||||||
'Provider': {
|
'Provider': {
|
||||||
'client_id': '',
|
'client_id': '',
|
||||||
@ -107,6 +107,7 @@ class DashboardOIDC:
|
|||||||
self.providers = decoder.decode(
|
self.providers = decoder.decode(
|
||||||
open(DashboardOIDC.ConfigurationFilePath, 'r').read()
|
open(DashboardOIDC.ConfigurationFilePath, 'r').read()
|
||||||
)
|
)
|
||||||
|
print(self.providers)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.error('Read OIDC file failed. Reason: ' + str(e))
|
current_app.logger.error('Read OIDC file failed. Reason: ' + str(e))
|
||||||
return False
|
return False
|
Loading…
x
Reference in New Issue
Block a user