Completed
Push — master ( 06424f...aac467 )
by Alex
86:38 queued 51:34
created

AbstractResponseType::setPrivateKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * OAuth 2.0 Abstract Response Type.
4
 *
5
 * @author      Alex Bilbie <[email protected]>
6
 * @copyright   Copyright (c) Alex Bilbie
7
 * @license     http://mit-license.org/
8
 *
9
 * @link        https://github.com/thephpleague/oauth2-server
10
 */
11
12
namespace League\OAuth2\Server\ResponseTypes;
13
14
use League\OAuth2\Server\CryptKey;
15
use League\OAuth2\Server\CryptTrait;
16
use League\OAuth2\Server\Entities\AccessTokenEntityInterface;
17
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
18
19
abstract class AbstractResponseType implements ResponseTypeInterface
20
{
21
    use CryptTrait;
22
23
    /**
24
     * @var AccessTokenEntityInterface
25
     */
26
    protected $accessToken;
27
28
    /**
29
     * @var RefreshTokenEntityInterface
30
     */
31
    protected $refreshToken;
32
33
    /**
34
     * @var CryptKey
35
     */
36
    protected $privateKey;
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    public function setAccessToken(AccessTokenEntityInterface $accessToken)
42
    {
43
        $this->accessToken = $accessToken;
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function setRefreshToken(RefreshTokenEntityInterface $refreshToken)
50
    {
51
        $this->refreshToken = $refreshToken;
52
    }
53
54
    /**
55
     * Set the private key
56
     *
57
     * @param \League\OAuth2\Server\CryptKey $key
58
     */
59
    public function setPrivateKey(CryptKey $key)
60
    {
61
        $this->privateKey = $key;
62
    }
63
64
}
65