Пример #1
0
    def create_client(self):
        dataset = DictDBWrap(USERDB)
        dataset.register_scope('https://dirg.org.umu.se/uma/read', 'get')

        resource_owner = 'linda'

        self.srv = ResourceServer(dataset, resource_owner)
        # map client API operation (HTTP GET) to scope
        self.srv.rs_handler.op2scope = {
            'GET': 'https://dirg.org.umu.se/uma/read'}
Пример #2
0
    def create_client(self):
        dataset = DictDBWrap(USERDB)
        dataset.register_scope('https://dirg.org.umu.se/uma/read', 'get')

        resource_owner = 'linda'

        self.srv = ResourceServer(dataset, resource_owner)
        # map client API operation (HTTP GET) to scope
        self.srv.rs_handler.op2scope = {
            'GET': 'https://dirg.org.umu.se/uma/read'
        }
Пример #3
0
    def create_client(self):
        dataset = DictDBWrap(USERDB)
        # The scope to dataset operation map
        dataset.register_scope('https://dirg.org.umu.se/uma/read', 'get')

        client = Client({}, client_authn_methods=CLIENT_AUTHN_METHOD)

        resource_owner = 'hans'
        self.rsh = ResourceSetHandler(dataset, client, resource_owner)

        self.rsh.client.provider_info = {
            "resource_set_registration_endpoint": 'https://as.example.com/rsr'}

        # No the real PAT obviously
        self.rsh.token["PAT"] = 'pat'

        # map client API operation (HTTP GET) to scope
        self.rsh.op2scope = {'GET': 'https://dirg.org.umu.se/uma/read'}
Пример #4
0
    def create_client(self):
        dataset = DictDBWrap(USERDB)
        # The scope to dataset operation map
        dataset.register_scope('https://dirg.org.umu.se/uma/read', 'get')

        client = Client({}, client_authn_methods=CLIENT_AUTHN_METHOD)

        resource_owner = 'hans'
        self.rsh = ResourceSetHandler(dataset, client, resource_owner)

        self.rsh.client.provider_info = {
            "resource_set_registration_endpoint": 'https://as.example.com/rsr'
        }

        # No the real PAT obviously
        self.rsh.token["PAT"] = 'pat'

        # map client API operation (HTTP GET) to scope
        self.rsh.op2scope = {'GET': 'https://dirg.org.umu.se/uma/read'}