Skip to content

Commit

Permalink
Merge pull request #6046 from mgugino-upstream-stage/fix-github-chall…
Browse files Browse the repository at this point in the history
…enge-auth

Re-add challenge auth verification to github and google
  • Loading branch information
sdodson committed Nov 8, 2017
2 parents 782e71e + 9ab6148 commit 5339ec5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions roles/openshift_master_facts/filter_plugins/openshift_master.py
Expand Up @@ -426,6 +426,12 @@ def __init__(self, api_version, idp):
IdentityProviderOauthBase.__init__(self, api_version, idp)
self._optional += [['hostedDomain', 'hosted_domain']]

def validate(self):
''' validate this idp instance '''
if self.challenge:
raise errors.AnsibleFilterError("|failed provider {0} does not "
"allow challenge authentication".format(self.__class__.__name__))


class GitHubIdentityProvider(IdentityProviderOauthBase):
""" GitHubIdentityProvider
Expand All @@ -444,6 +450,12 @@ def __init__(self, api_version, idp):
self._optional += [['organizations'],
['teams']]

def validate(self):
''' validate this idp instance '''
if self.challenge:
raise errors.AnsibleFilterError("|failed provider {0} does not "
"allow challenge authentication".format(self.__class__.__name__))


class FilterModule(object):
''' Custom ansible filters for use by the openshift_master role'''
Expand Down

0 comments on commit 5339ec5

Please sign in to comment.