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,3 @@
|
|||
from app import app
|
||||
from oauth.services.github import GithubOAuthService
|
||||
from util.config.validators import BaseValidator, ConfigValidationException
|
||||
|
||||
|
@ -7,7 +6,7 @@ class BaseGitHubValidator(BaseValidator):
|
|||
config_key = None
|
||||
|
||||
@classmethod
|
||||
def validate(cls, config, user, user_password):
|
||||
def validate(cls, config, user, user_password, app):
|
||||
""" Validates the OAuth credentials and API endpoint for a Github service. """
|
||||
github_config = config.get(cls.config_key)
|
||||
if not github_config:
|
||||
|
|
Reference in a new issue