Passed
Push — master ( 8278f2...2a258c )
by Alexandre
02:55
created

BearerToken   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Alexandre
5
 * Date: 27/05/2018
6
 * Time: 17:40
7
 */
8
9
namespace OAuth2\Credentials;
10
11
12
/**
13
 * Class BearerToken
14
 * @package OAuth2\Credentials
15
 *
16
 * @see https://tools.ietf.org/html/rfc6750#section-1.2
17
 * A security token with the property that any party in possession of
18
 * the token (a "bearer") can use the token in any way that any other
19
 * party in possession of it can.  Using a bearer token does not
20
 * require a bearer to prove possession of cryptographic key material
21
 * (proof-of-possession).
22
 */
23
class BearerToken extends AccessToken
24
{
25
    public function __construct(string $token, array $scopes, string $clientIdentifier,
26
                                ?string $resourceOwnerIdentifier,
27
                                \DateTimeInterface $expiresAt, ?string $authorizationCode = null)
28
    {
29
        parent::__construct('bearer', $token, $scopes, $clientIdentifier, $resourceOwnerIdentifier, $expiresAt,
30
            $authorizationCode);
31
    }
32
}