sanic_jwt/authentication.py
async def generate_access_token(
        self, user, extend_payload=None, custom_claims=None
    ):
        """
        Generate an access token for a given user.
        """
        payload = await self._get_payload(user, inline_claims=custom_claims)
        secret = await self._get_secret(payload=payload, encode=True)
        algorithm = self._get_algorithm()

        if extend_payload:
            payload = await utils.call(
                extend_payload, payload=payload, user=user
            )

        access_token = jwt.encode(payload, secret, algorithm=algorithm)
        return access_token

        Generate an access token for a given user.
        
Generate an access token for a given user.
Generate an access token for a given user .
async def generate_access_token(
        self, user, extend_payload=None, custom_claims=None
    ):
        payload = await self._get_payload(user, inline_claims=custom_claims)
        secret = await self._get_secret(payload=payload, encode=True)
        algorithm = self._get_algorithm()
        if extend_payload:
            payload = await utils.call(
                extend_payload, payload=payload, user=user
            )
        access_token = jwt.encode(payload, secret, algorithm=algorithm)
        return access_token
async def generate_access_token ( self , user , extend_payload = None , custom_claims = None ) : payload = await self . _get_payload ( user , inline_claims = custom_claims ) secret = await self . _get_secret ( payload = payload , encode = True ) algorithm = self . _get_algorithm ( ) if extend_payload : payload = await utils . call ( extend_payload , payload = payload , user = user ) access_token = jwt . encode ( payload , secret , algorithm = algorithm ) return access_token
Generate an access token for a given user.
Generate an access token for a given user .
"""
        Generate an access token for a given user.
        """
self
user
extend_payload
custom_claims