Пример #1
0
 def __init__(self,
              httplib=None,
              keyjar=None,
              client_authn_method=None,
              conf=None):
     Service.__init__(self,
                      httplib=httplib,
                      keyjar=keyjar,
                      client_authn_method=client_authn_method,
                      conf=conf)
     self.post_parse_response.append(self.oauth_post_parse_response)
Пример #2
0
 def __init__(self,
              httplib=None,
              keyjar=None,
              client_authn_method=None,
              conf=None):
     Service.__init__(self,
                      httplib=httplib,
                      keyjar=keyjar,
                      client_authn_method=client_authn_method,
                      conf=conf)
     self.pre_construct.append(self.oauth_pre_construct)
Пример #3
0
 def __init__(self,
              httplib=None,
              keyjar=None,
              client_authn_method=None,
              conf=None):
     Service.__init__(self,
                      httplib=httplib,
                      keyjar=keyjar,
                      client_authn_method=client_authn_method,
                      conf=conf)
     self.pre_construct = [self.oic_pre_construct]
     self.post_parse_response.insert(0, self.oic_post_parse_response)
Пример #4
0
 def __init__(self,
              httplib=None,
              keyjar=None,
              client_authn_method=None,
              conf=None):
     Service.__init__(self,
                      httplib=httplib,
                      keyjar=keyjar,
                      client_authn_method=client_authn_method,
                      conf=conf)
     self.webfinger = webfinger.WebFinger(httpd=self.httplib,
                                          default_rel=OIC_ISSUER)
     self.post_parse_response.append(self.wf_post_parse_response)
Пример #5
0
    def do_request_init(self,
                        cli_info,
                        body_type="",
                        method="GET",
                        authn_method='',
                        request_args=None,
                        http_args=None,
                        **kwargs):

        try:
            _algs = kwargs['algs']
        except KeyError:
            _algs = {}
        else:
            del kwargs['algs']

        _info = Service.do_request_init(self,
                                        cli_info,
                                        body_type=body_type,
                                        method=method,
                                        authn_method=authn_method,
                                        request_args=request_args,
                                        http_args=http_args,
                                        **kwargs)

        _info['algs'] = _algs
        return _info
Пример #6
0
    def gather_request_args(self, cli_info, **kwargs):
        ar_args = Service.gather_request_args(self, cli_info, **kwargs)

        if 'redirect_uri' not in ar_args:
            try:
                ar_args['redirect_uri'] = cli_info.redirect_uris[0]
            except (KeyError, AttributeError):
                raise MissingParameter('redirect_uri')

        return ar_args