sanic_jwt/authentication.py
async def _decode(self, token, verify=True, inline_claims=None):
        """
        Take a JWT and return a decoded payload. Optionally, will verify
        the claims on the token.
        """
        secret = await self._get_secret(token=token)
        algorithm = self._get_algorithm()
        kwargs = {}

        for claim in self.claims:
            if claim != "exp":
                setting = "claim_{}".format(claim.lower())
                if setting in self.config:  # noqa
                    value = self.config.get(setting)
                    kwargs.update({claim_label[claim]: value})

        kwargs["leeway"] = int(self.config.leeway())
        if "claim_aud" in self.config:  # noqa
            kwargs["audience"] = self.config.claim_aud()
        if "claim_iss" in self.config:  # noqa
            kwargs["issuer"] = self.config.claim_iss()

        decoded = jwt.decode(
            token,
            secret,
            algorithms=[algorithm],
            verify=verify,
            options={"verify_exp": self.config.verify_exp()},
            **kwargs,
        )

        if verify:
            if self._extra_verifications:
                self._verify_extras(decoded)
            if self._custom_claims or inline_claims:
                self._verify_custom_claims(
                    decoded, inline_claims=inline_claims
                )

        return decoded

        Take a JWT and return a decoded payload. Optionally, will verify
        the claims on the token.
        
Take a JWT and return a decoded payload. Optionally, will verify
the claims on the token.
Take a JWT and return a decoded payload . Optionally will verify the claims on the token .
async def _decode(self, token, verify=True, inline_claims=None):
        secret = await self._get_secret(token=token)
        algorithm = self._get_algorithm()
        kwargs = {}
        for claim in self.claims:
            if claim != "exp":
                setting = "claim_{}".format(claim.lower())
                if setting in self.config:  
                    value = self.config.get(setting)
                    kwargs.update({claim_label[claim]: value})
        kwargs["leeway"] = int(self.config.leeway())
        if "claim_aud" in self.config:  
            kwargs["audience"] = self.config.claim_aud()
        if "claim_iss" in self.config:  
            kwargs["issuer"] = self.config.claim_iss()
        decoded = jwt.decode(
            token,
            secret,
            algorithms=[algorithm],
            verify=verify,
            options={"verify_exp": self.config.verify_exp()},
            **kwargs,
        )
        if verify:
            if self._extra_verifications:
                self._verify_extras(decoded)
            if self._custom_claims or inline_claims:
                self._verify_custom_claims(
                    decoded, inline_claims=inline_claims
                )
        return decoded
async def _decode ( self , token , verify = True , inline_claims = None ) : secret = await self . _get_secret ( token = token ) algorithm = self . _get_algorithm ( ) kwargs = { } for claim in self . claims : if claim != "exp" : setting = "claim_{}" . format ( claim . lower ( ) ) if setting in self . config : value = self . config . get ( setting ) kwargs . update ( { claim_label [ claim ] : value } ) kwargs [ "leeway" ] = int ( self . config . leeway ( ) ) if "claim_aud" in self . config : kwargs [ "audience" ] = self . config . claim_aud ( ) if "claim_iss" in self . config : kwargs [ "issuer" ] = self . config . claim_iss ( ) decoded = jwt . decode ( token , secret , algorithms = [ algorithm ] , verify = verify , options = { "verify_exp" : self . config . verify_exp ( ) } , ** kwargs , ) if verify : if self . _extra_verifications : self . _verify_extras ( decoded ) if self . _custom_claims or inline_claims : self . _verify_custom_claims ( decoded , inline_claims = inline_claims ) return decoded
Take a JWT and return a decoded payload.
Take a JWT and return a decoded payload .
"""
        Take a JWT and return a decoded payload. Optionally, will verify
        the claims on the token.
        """ # noqa # noqa # noqa
self
token
verify
inline_claims