LittleDemon WebShell


Linux hosting5.siteguarding.com 3.10.0-962.3.2.lve1.5.88.el7.x86_64 #1 SMP Fri Sep 26 14:06:42 UTC 2025 x86_64
Path : /home/devsafetybis/spotify.dev.safetybis.com/src/SpotifyWebAPI/
File Upload :
Command :
Current File : /home/devsafetybis/spotify.dev.safetybis.com/src/SpotifyWebAPI/SpotifyWebAPIAuthException.php

<?php

declare(strict_types=1);

namespace SpotifyWebAPI;

// Extends from SpotifyWebApiException for backwards compatibility
class SpotifyWebAPIAuthException extends SpotifyWebAPIException
{
    public const INVALID_CLIENT = 'Invalid client';
    public const INVALID_CLIENT_SECRET = 'Invalid client secret';
    public const INVALID_REFRESH_TOKEN = 'Invalid refresh token';

    /**
     * Returns whether the exception was thrown because of invalid credentials.
     *
     * @return bool
     */
    public function hasInvalidCredentials()
    {
        return in_array($this->getMessage(), [
            self::INVALID_CLIENT,
            self::INVALID_CLIENT_SECRET,
        ]);
    }

    /**
     * Returns whether the exception was thrown because of an invalid refresh token.
     *
     * @return bool
     */
    public function hasInvalidRefreshToken()
    {
        return $this->getMessage() === self::INVALID_REFRESH_TOKEN;
    }
}

LittleDemon - FACEBOOK
[ KELUAR ]