HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: /var/www/javago-portal-updates/vendor/lcobucci/jwt/src/Token/InvalidTokenStructure.php
<?php
declare(strict_types=1);

namespace Lcobucci\JWT\Token;

use InvalidArgumentException;
use Lcobucci\JWT\Exception;

final class InvalidTokenStructure extends InvalidArgumentException implements Exception
{
    public static function missingOrNotEnoughSeparators(): self
    {
        return new self('The JWT string must have two dots');
    }

    public static function missingHeaderPart(): self
    {
        return new self('The JWT string is missing the Header part');
    }

    public static function missingClaimsPart(): self
    {
        return new self('The JWT string is missing the Claim part');
    }

    public static function missingSignaturePart(): self
    {
        return new self('The JWT string is missing the Signature part');
    }

    /** @param non-empty-string $part */
    public static function arrayExpected(string $part): self
    {
        return new self($part . ' must be an array with non-empty-string keys');
    }

    public static function dateIsNotParseable(string $value): self
    {
        return new self('Value is not in the allowed date format: ' . $value);
    }
}