(self, token)
Validate Bearer token.
Validate Bearer token.
Validate Bearer token .
def _validate_bearer(self, token):
        """Validate Bearer token."""
        if self.authentication_method & BEARER == 0:
            raise InvalidToken("Bearer authentication is not supported.")
        try:
            self.access_token = AccessToken.objects.get(token=token)
        except AccessToken.DoesNotExist:
            raise InvalidToken("Token doesn't exist")
def _validate_bearer ( self , token ) : if self . authentication_method & BEARER == 0 : raise InvalidToken ( "Bearer authentication is not supported." ) try : self . access_token = AccessToken . objects . get ( token = token ) except AccessToken . DoesNotExist : raise InvalidToken ( "Token doesn't exist" )