InvalidGrantException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
namespace kalanis\OAuth2\Exceptions;
4
5
6
use Exception;
7
8
9
/**
10
 * InvalidGrantException is thrown when provided authorization grant (authorization vode, resource owner credentials)
11
 * or refresh token is invalid, expired, revoked, does not match redirect URI used in authorization request
12
 * @package kalanis\OAuth2\Exceptions
13
 */
14
class InvalidGrantException extends OAuthException
15
{
16
17
    protected string $key = 'invalid_grant';
18
19
20
    /**
21
     * @param string $message
22
     * @param Exception|null $previous
23
     */
24
    public function __construct($message = 'Givent grant token is invalid or expired', Exception $previous = null)
25
    {
26
        parent::__construct($message, 400, $previous);
27
    }
28
}
29