def info(self): return self.stub.info(token_pb2.Empty())
def PostToken(self, request, context): ''' post token to redis with expire ''' ttl = request.exp - round(time.time()) RC.set(request.token, '', ex=ttl) return token_pb2.Empty()