#152 Small fixes for OIDC client
Merged 7 years ago by puiterwijk. Opened 7 years ago by puiterwijk.
puiterwijk/ipsilon client-fixes  into  master

@@ -72,6 +72,7 @@ 

  Requires:       mod_auth_mellon >= 0.11.0

  Requires:       mod_auth_openidc

  Requires:       mod_ssl

+ Requires:       python-requests

  BuildArch:      noarch

  

  %description client

@@ -373,10 +373,14 @@ 

  def openidc():

      logger.info('Installing OpenID Connect Relying Party')

  

+     requests_args = {}

+     if args['openidc_skip_ssl_validation']:

+         requests_args['verify'] = False

+ 

      discovery_url = '%s/openidc/wellknown_openid_configuration' % \

                      args['openidc_idp_url']

      try:

-         r = requests.get(discovery_url)

+         r = requests.get(discovery_url, **requests_args)

          r.raise_for_status()

          discovered_info = r.json()

      except Exception, e:  # pylint: disable=broad-except
@@ -410,7 +414,7 @@ 

      logger.info('Registering RP with the IdP')

      try:

          r = requests.post(discovered_info['registration_endpoint'],

-                           json=client_info)

+                           json=client_info, **requests_args)

          r.raise_for_status()

          registration_response = r.json()

      except Exception, e:  # pylint: disable=broad-except

no initial comment

rebased

7 years ago

ACK, but I'd improved the second commit message.

rebased

7 years ago

rebased

7 years ago

rebased

7 years ago

Pull-Request has been merged by puiterwijk

7 years ago