def __init__(self, service_context, state_db, client_authn_factory=None,
                 conf=None, rel='', **kwargs):
        Service.__init__(self, service_context, state_db,
                         client_authn_factory=client_authn_factory, conf=conf,
                         **kwargs)

        self.rel = rel or OIC_ISSUER
 def __init__(self, service_context, client_authn_factory=None, conf=None):
     Service.__init__(self, service_context, client_authn_factory=client_authn_factory,
                      conf=conf)
     self.pre_construct = [self.add_client_behaviour_preference,
                           add_redirect_uris, add_request_uri,
                           add_post_logout_redirect_uris,
                           add_jwks_uri_or_jwks]
     self.post_construct = [self.oidc_post_construct]
Example #3
0
 def __init__(self, service_context, client_authn_factory=None, conf=None):
     Service.__init__(self,
                      service_context,
                      client_authn_factory=client_authn_factory,
                      conf=conf)
     self.pre_construct = [
         self.get_id_token_hint, self.add_post_logout_redirect_uri,
         self.add_state
     ]
Example #4
0
 def __init__(self,
              service_context,
              state_db,
              client_authn_factory=None,
              conf=None):
     Service.__init__(self,
                      service_context,
                      state_db,
                      client_authn_factory=client_authn_factory,
                      conf=conf)
 def __init__(self,
              service_context,
              state_db,
              client_authn_factory=None,
              conf=None):
     Service.__init__(self,
                      service_context,
                      state_db,
                      client_authn_factory=client_authn_factory,
                      conf=conf)
     self.pre_construct = [self.oidc_pre_construct]
Example #6
0
 def __init__(self,
              service_context,
              state_db,
              client_authn_factory=None,
              conf=None):
     Service.__init__(self,
                      service_context,
                      state_db,
                      client_authn_factory=client_authn_factory,
                      conf=conf)
     self.pre_construct.append(self.cc_pre_construct)
     self.post_construct.append(self.cc_post_construct)
Example #7
0
 def __init__(self,
              service_context,
              state_db,
              client_authn_factory=None,
              conf=None):
     Service.__init__(self,
                      service_context,
                      state_db=state_db,
                      client_authn_factory=client_authn_factory,
                      conf=conf)
     self.pre_construct.extend([pick_redirect_uris, set_state_parameter])
     self.post_construct.append(self.store_auth_request)
Example #8
0
    def gather_request_args(self, **kwargs):
        ar_args = Service.gather_request_args(self, **kwargs)

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

        return ar_args
Example #9
0
class TestRequest(object):
    @pytest.fixture(autouse=True)
    def create_service(self):
        service_context = ServiceContext(None)
        self.service = Service(service_context, client_authn_method=None)

    def test_construct(self):
        req_args = {'foo': 'bar'}
        _req = self.service.construct(request_args=req_args)
        assert isinstance(_req, Message)
        assert list(_req.keys()) == ['foo']
def test_service():
    req = Service(service_context=ServiceContext(None),
                  client_authn_method=None)
    assert isinstance(req, Service)
Example #11
0
def test_service():
    req = Service(state_db=InMemoryStateDataBase(),
                  service_context=ServiceContext(None),
                  client_authn_method=None)
    assert isinstance(req, Service)
 def create_service(self):
     service_context = ServiceContext(None)
     self.service = Service(service_context,
                            state_db=InMemoryStateDataBase(),
                            client_authn_method=None)
Example #13
0
 def __init__(self, service_context, client_authn_factory=None, conf=None):
     Service.__init__(self,
                      service_context,
                      client_authn_factory=client_authn_factory,
                      conf=conf)
     self.pre_construct.append(self.oauth_pre_construct)
Example #14
0
 def create_service(self):
     service_context = ServiceContext(None)
     self.service = Service(service_context, client_authn_method=None)