protected function findUserByToken(Token $token)
    {
        // retrieves the user ID from the token.
        $id = $token->getClaim('sub');

        // use the users provider to find the token subject (user)
        // but it's id (subject)
        return $this->provider->retrieveById($id);
    }
protected function findUserByToken(Token $token)
    {
        // retrieves the user ID from the token.
        $id = $token->getClaim('sub');

        // use the users provider to find the token subject (user)
        // but it's id (subject)
        return $this->provider->retrieveById($id);
    }
protected function findUserByToken ( Token $ token ) { // retrieves the user ID from the token. $ id = $ token -> getClaim ( 'sub' ) ; // use the users provider to find the token subject (user) // but it's id (subject) return $ this -> provider -> retrieveById ( $ id ) ; }
Retrieves the user by it's token.

@param Token $token
@return Authenticatable|null
Retrieves the user by it s token .