Create a JWT Token, using requestvalidator method.

def create_token(self, request, refresh_token=False):
        """Create a JWT Token, using requestvalidator method."""

        if callable(self.expires_in):
            expires_in = self.expires_in(request)
        else:
            expires_in = self.expires_in

        request.expires_in = expires_in

        return self.request_validator.get_jwt_bearer_token(None, None, request)