Remove jwt validation for jschorr to fix later
Refactor oauth validate method to take config over entire appconfig
This commit is contained in:
parent
7df8ed4a60
commit
301cc6992a
27 changed files with 136 additions and 76 deletions
|
@ -10,6 +10,7 @@ class BaseGitHubValidator(BaseValidator):
|
|||
""" Validates the OAuth credentials and API endpoint for a Github service. """
|
||||
config = validator_context.config
|
||||
client = validator_context.http_client
|
||||
url_scheme_and_hostname = validator_context.url_scheme_and_hostname
|
||||
|
||||
github_config = config.get(cls.config_key)
|
||||
if not github_config:
|
||||
|
@ -33,7 +34,7 @@ class BaseGitHubValidator(BaseValidator):
|
|||
'organization')
|
||||
|
||||
oauth = GithubOAuthService(config, cls.config_key)
|
||||
result = oauth.validate_client_id_and_secret(client)
|
||||
result = oauth.validate_client_id_and_secret(client, url_scheme_and_hostname)
|
||||
if not result:
|
||||
raise ConfigValidationException('Invalid client id or client secret')
|
||||
|
||||
|
|
Reference in a new issue