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

BearerToken::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 6
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
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
}