mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-12 16:40:26 +00:00
Yapf code formatting
This commit is contained in:
parent
32236faae8
commit
de581e9e1d
@ -6,6 +6,7 @@ import os
|
|||||||
from ..lib.certutil import KEY_FILE, CERT_FILE
|
from ..lib.certutil import KEY_FILE, CERT_FILE
|
||||||
from ..lib.utils import urlparse
|
from ..lib.utils import urlparse
|
||||||
|
|
||||||
|
|
||||||
class SAML(object):
|
class SAML(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
if current_app.config['SAML_ENABLED']:
|
if current_app.config['SAML_ENABLED']:
|
||||||
@ -34,10 +35,10 @@ class SAML(object):
|
|||||||
'SAML: IDP Metadata initial load failed')
|
'SAML: IDP Metadata initial load failed')
|
||||||
exit(-1)
|
exit(-1)
|
||||||
|
|
||||||
|
|
||||||
def get_idp_data(self):
|
def get_idp_data(self):
|
||||||
|
|
||||||
lifetime = timedelta(minutes=current_app.config['SAML_METADATA_CACHE_LIFETIME'])
|
lifetime = timedelta(
|
||||||
|
minutes=current_app.config['SAML_METADATA_CACHE_LIFETIME'])
|
||||||
|
|
||||||
if self.idp_timestamp + lifetime < datetime.now():
|
if self.idp_timestamp + lifetime < datetime.now():
|
||||||
background_thread = Thread(target=self.retrieve_idp_data())
|
background_thread = Thread(target=self.retrieve_idp_data())
|
||||||
@ -45,7 +46,6 @@ class SAML(object):
|
|||||||
|
|
||||||
return self.idp_data
|
return self.idp_data
|
||||||
|
|
||||||
|
|
||||||
def retrieve_idp_data(self):
|
def retrieve_idp_data(self):
|
||||||
|
|
||||||
if 'SAML_IDP_SSO_BINDING' in current_app.config:
|
if 'SAML_IDP_SSO_BINDING' in current_app.config:
|
||||||
|
Loading…
Reference in New Issue
Block a user