sanic_jwt/authentication.py
async def _get_payload(self, user, inline_claims=None):
        """
        Given a user object, create a payload and extend it as configured.
        """
        payload = await utils.call(self.build_payload, user)

        if (
            not isinstance(payload, dict)
            or self.config.user_id() not in payload
        ):
            raise exceptions.InvalidPayload

        payload = await utils.call(
            self.add_claims, payload, user, inline_claims
        )

        extend_payload_args = inspect.getfullargspec(self.extend_payload)
        args = [payload]
        if "user" in extend_payload_args.args:
            args.append(user)
        payload = await utils.call(self.extend_payload, *args)

        if self.config.scopes_enabled():
            scopes = await utils.call(self.add_scopes_to_payload, user)
            if not isinstance(scopes, (tuple, list)):
                scopes = [scopes]
            payload[self.config.scopes_name()] = scopes

        claims = self.claims + [x.get_key() for x in self._custom_claims]
        missing = [x for x in claims if x not in payload]
        if missing:
            logger.debug("")
            raise exceptions.MissingRegisteredClaim(missing=missing)

        return payload

        Given a user object, create a payload and extend it as configured.
        
Given a user object, create a payload and extend it as configured.
Given a user object create a payload and extend it as configured .
async def _get_payload(self, user, inline_claims=None):
        payload = await utils.call(self.build_payload, user)
        if (
            not isinstance(payload, dict)
            or self.config.user_id() not in payload
        ):
            raise exceptions.InvalidPayload
        payload = await utils.call(
            self.add_claims, payload, user, inline_claims
        )
        extend_payload_args = inspect.getfullargspec(self.extend_payload)
        args = [payload]
        if "user" in extend_payload_args.args:
            args.append(user)
        payload = await utils.call(self.extend_payload, *args)
        if self.config.scopes_enabled():
            scopes = await utils.call(self.add_scopes_to_payload, user)
            if not isinstance(scopes, (tuple, list)):
                scopes = [scopes]
            payload[self.config.scopes_name()] = scopes
        claims = self.claims + [x.get_key() for x in self._custom_claims]
        missing = [x for x in claims if x not in payload]
        if missing:
            logger.debug("")
            raise exceptions.MissingRegisteredClaim(missing=missing)
        return payload
async def _get_payload ( self , user , inline_claims = None ) : payload = await utils . call ( self . build_payload , user ) if ( not isinstance ( payload , dict ) or self . config . user_id ( ) not in payload ) : raise exceptions . InvalidPayload payload = await utils . call ( self . add_claims , payload , user , inline_claims ) extend_payload_args = inspect . getfullargspec ( self . extend_payload ) args = [ payload ] if "user" in extend_payload_args . args : args . append ( user ) payload = await utils . call ( self . extend_payload , * args ) if self . config . scopes_enabled ( ) : scopes = await utils . call ( self . add_scopes_to_payload , user ) if not isinstance ( scopes , ( tuple , list ) ) : scopes = [ scopes ] payload [ self . config . scopes_name ( ) ] = scopes claims = self . claims + [ x . get_key ( ) for x in self . _custom_claims ] missing = [ x for x in claims if x not in payload ] if missing : logger . debug ( "" ) raise exceptions . MissingRegisteredClaim ( missing = missing ) return payload
Given a user object, create a payload and extend it as configured.
Given a user object create a payload and extend it as configured .
"""
        Given a user object, create a payload and extend it as configured.
        """
self
user
inline_claims