def _fetch_auth_token(self, token_str): token_model = self.fetch(token_str) if token_model is not None: token = Token(token_model) return token return None
def _fetch_auth_token(self, token_str): token_model = self.fetch(token_str) if token_model is not None: token = Token(token_model) return token # If we've got this far it's possible the token is a legacy client JWT. return _maybe_jwt(token_str, self._client_secret)
def _fetch_token(self, token_str): token_model = (self._session.query( models.Token).filter_by(value=token_str).one_or_none()) if token_model is not None: token = Token(token_model) return token # If we've got this far it's possible the token is a legacy client JWT. return _maybe_jwt(token_str, self._client_secret)