jwt_auth/mixins.py
def authenticate_credentials(self, payload):
        """
        Returns an active user that matches the payload's user id and email.
        """
        try:
            user_id = jwt_get_user_id_from_payload(payload)

            if user_id:
                user = User.objects.get(pk=user_id, is_active=True)
            else:
                msg = 'Invalid payload'
                raise exceptions.AuthenticationFailed(msg)
        except User.DoesNotExist:
            msg = 'Invalid signature'
            raise exceptions.AuthenticationFailed(msg)

        return user

        Returns an active user that matches the payload's user id and email.
        
Returns an active user that matches the payload's user id and email.
Returns an active user that matches the payload ' s user id and email .
def authenticate_credentials(self, payload):
        try:
            user_id = jwt_get_user_id_from_payload(payload)
            if user_id:
                user = User.objects.get(pk=user_id, is_active=True)
            else:
                msg = 'Invalid payload'
                raise exceptions.AuthenticationFailed(msg)
        except User.DoesNotExist:
            msg = 'Invalid signature'
            raise exceptions.AuthenticationFailed(msg)
        return user
def authenticate_credentials ( self , payload ) : try : user_id = jwt_get_user_id_from_payload ( payload ) if user_id : user = User . objects . get ( pk = user_id , is_active = True ) else : msg = 'Invalid payload' raise exceptions . AuthenticationFailed ( msg ) except User . DoesNotExist : msg = 'Invalid signature' raise exceptions . AuthenticationFailed ( msg ) return user
Returns an active user that matches the payload's user id and email.
Returns an active user that matches the payload ' s user id and email .
"""
        Returns an active user that matches the payload's user id and email.
        """
self
payload