def __init__(self, log): self.log = log config = Cs3ConfigManager.get_config() channel = ChannelConnector.get_channel() self.config = config self.auth = Authenticator(config, channel) self.cs3_api = cs3gw_grpc.GatewayAPIStub(channel) return
def init(config, log): '''Init module-level variables''' ctx['log'] = log ctx['chunksize'] = config.getint('io', 'chunksize') ctx['authtokenvalidity'] = config.getint('cs3', 'authtokenvalidity') revahost = config.get('cs3', 'revahost') # prepare the gRPC connection ch = grpc.insecure_channel(revahost) ctx['cs3stub'] = cs3gw_grpc.GatewayAPIStub(ch)
def __init__(self, log): self.log = log self.config = Cs3ConfigManager().get_config() self.auth = Auth.get_authenticator(config=self.config, log=self.log) channel = ChannelConnector().get_channel() auth_interceptor = check_auth_interceptor.CheckAuthInterceptor( log, self.auth) intercept_channel = grpc.intercept_channel(channel, auth_interceptor) self.cs3_api = cs3gw_grpc.GatewayAPIStub(intercept_channel) return
def __init__(self, log): self.log = log self.config = Cs3ConfigManager().get_config() self.auth = Auth.get_authenticator(config=self.config, log=self.log) self.file_api = Cs3FileApi(log) channel = ChannelConnector().get_channel() auth_interceptor = check_auth_interceptor.CheckAuthInterceptor( log, self.auth) intercept_channel = grpc.intercept_channel(channel, auth_interceptor) self.cs3_api = grpc_gateway.GatewayAPIStub(intercept_channel) self.public_share_api = link_api_grpc.LinkAPIStub(channel) return
def init(inconfig, inlog): '''Init module-level variables''' global config # pylint: disable=global-statement global log # pylint: disable=global-statement global tok # pylint: disable=global-statement config = inconfig log = inlog #revaurl = config.get('cs3', 'revaurl') revaurl = 'iota:19000' # XXX for now # prepare the gRPC connection ch = grpc.insecure_channel(revaurl) cs3stub = cs3gw_grpc.GatewayAPIStub(ch) authReq = cs3gw.AuthenticateRequest(type='basic', client_id='gonzalhu', client_secret='test') tok = cs3stub.Authenticate(authReq)
def __init__(self, config=None, log=None): self.config = config self.log = log channel = ChannelConnector().get_channel() self.cs3_stub = cs3gw_grpc.GatewayAPIStub(channel)
def __init__(self, log, config) -> None: self.config = config self.auth = ExtAuthenticator(config, log) self.file_api = ExtCs3File(log, config) self.cs3_api = cs3gw_grpc.GatewayAPIStub(ChannelConnector().get_channel()) self.log = log
def __init__(self, config, log): super().__init__(config, log) self.config = config self.log = log channel = ChannelConnector().get_channel() self.cs3_api = cs3gw_grpc.GatewayAPIStub(channel)
def __init__(self, config, channel): self.config = config self.cs3_api = cs3gw_grpc.GatewayAPIStub(channel)