• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codeigniter4 / shield / 13173436689

06 Feb 2025 06:54AM UTC coverage: 92.833%. First build
13173436689

Pull #1243

github

web-flow
Merge 0ec620e68 into 492365d93
Pull Request #1243: chore: update dependencies to support PHP 8.1 - 8.4

83 of 96 new or added lines in 23 files covered. (86.46%)

2785 of 3000 relevant lines covered (92.83%)

147.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/Authentication/JWT/Exceptions/InvalidTokenException.php
1
<?php
2

3
declare(strict_types=1);
4

5
/**
6
 * This file is part of CodeIgniter Shield.
7
 *
8
 * (c) CodeIgniter Foundation <admin@codeigniter.com>
9
 *
10
 * For the full copyright and license information, please view
11
 * the LICENSE file that was distributed with this source code.
12
 */
13

14
namespace CodeIgniter\Shield\Authentication\JWT\Exceptions;
15

16
use CodeIgniter\Shield\Exceptions\ValidationException;
17
use Exception;
18

19
class InvalidTokenException extends ValidationException
20
{
21
    public const INVALID_TOKEN      = 1;
22
    public const EXPIRED_TOKEN      = 2;
23
    public const BEFORE_VALID_TOKEN = 3;
24

25
    public static function forInvalidToken(Exception $e): self
26
    {
27
        return new self(lang('Auth.invalidJWT'), self::INVALID_TOKEN, $e);
24✔
28
    }
29

30
    public static function forExpiredToken(Exception $e): self
31
    {
32
        return new self(lang('Auth.expiredJWT'), self::EXPIRED_TOKEN, $e);
12✔
33
    }
34

35
    public static function forBeforeValidToken(Exception $e): self
36
    {
37
        return new self(lang('Auth.beforeValidJWT'), self::BEFORE_VALID_TOKEN, $e);
×
38
    }
39
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc