Move config provider to _init to decouple from app
remove app references from validators
This commit is contained in:
parent
86929c16d3
commit
d45b925155
26 changed files with 54 additions and 51 deletions
|
@ -1,4 +1,4 @@
|
|||
from app import app, OVERRIDE_CONFIG_DIRECTORY
|
||||
from _init import OVERRIDE_CONFIG_DIRECTORY
|
||||
from data.users.externaljwt import ExternalJWTAuthN
|
||||
from util.config.validators import BaseValidator, ConfigValidationException
|
||||
|
||||
|
@ -6,7 +6,7 @@ class JWTAuthValidator(BaseValidator):
|
|||
name = "jwt"
|
||||
|
||||
@classmethod
|
||||
def validate(cls, config, user, user_password, public_key_path=None):
|
||||
def validate(cls, config, user, user_password, app, public_key_path=None):
|
||||
""" Validates the JWT authentication system. """
|
||||
if config.get('AUTHENTICATION_TYPE', 'Database') != 'JWT':
|
||||
return
|
||||
|
|
Reference in a new issue