src/ApiTokenCookieFactory.php
protected function createToken($userId, $csrfToken, Carbon $expiration)
    {
        return JWT::encode([
            'sub' => $userId,
            'csrf' => $csrfToken,
            'expiry' => $expiration->getTimestamp(),
        ], $this->encrypter->getKey());
    }
protected function createToken($userId, $csrfToken, Carbon $expiration)
    {
        return JWT::encode([
            'sub' => $userId,
            'csrf' => $csrfToken,
            'expiry' => $expiration->getTimestamp(),
        ], $this->encrypter->getKey());
    }
protected function createToken ( $ userId , $ csrfToken , Carbon $ expiration ) { return JWT :: encode ( [ 'sub' => $ userId , 'csrf' => $ csrfToken , 'expiry' => $ expiration -> getTimestamp ( ) , ] , $ this -> encrypter -> getKey ( ) ) ; }
Create a new JWT token for the given user ID and CSRF token.

@param  mixed  $userId
@param  string  $csrfToken
@param  \Carbon\Carbon  $expiration
@return string
Create a new JWT token for the given user ID and CSRF token .