The following method has to raise NotFound in case of TokenNotFound
def _verify_token(self, token_id, belongs_to=None): """Verify the given token and return the token_ref.""" try: token_ref = self.token_api.get_token(token_id) return self._verify_token_ref(token_ref, belongs_to) except exception.TokenNotFound: raise exception.Unauthorized()
The following method has to raise NotFound in case of TokenNotFound
def _verify_token(self, token_id, belongs_to=None):
token_ ref = self.token_ api.get_ token(token_ id) token_ref( token_ref, belongs_to) TokenNotFound:
raise exception. Unauthorized( )
"""Verify the given token and return the token_ref."""
try:
return self._verify_
except exception.