def identify(self, request): user = request.headers.get('user', None) if user is not None: if user == '': return Anonymous() return Identity(userid=user, password=request.headers['password'])
def identify(self, request): token = self.get_token(request) if token is None or not self.token_is_valid( token, self.encryption_key ): return NO_IDENTITY return Identity("Testuser")
def identify(self, request): user = request.headers.get("user", None) if user is not None: if user == "": return Anonymous() return Identity( userid=user, password=request.headers["password"] )
def log_in(self, request): response = Response() with pytest.deprecated_call(): generic.remember_identity(response, request, Identity(userid='user', payload='Amazing'), lookup=request.lookup) return response
def identify(self, request): return Identity("testidentity")
def log_in(self, request): response = Response() request.app.remember_identity( response, request, Identity(userid="user", payload="Amazing") ) return response
def identify(self, request): data = request.cookies.get("dumb_id", None) if data is None: return NO_IDENTITY data = json.loads(base64.b64decode(data).decode()) return Identity(**data)
def identify(self, request): return Identity('testidentity')