Completed
Push — master ( b7a3de...2fd7f6 )
by Дмитрий
04:56
created

AccessToken::getIdentity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * SocialConnect project
4
 * @author: Patsura Dmitry https://github.com/ovr <[email protected]>
5
 */
6
7
namespace SocialConnect\OpenID;
8
9
use SocialConnect\Auth\AccessTokenInterface;
10
11
class AccessToken implements AccessTokenInterface
12
{
13
    /**
14
     * OpenID doesnot have a $token, it response $identity, it's a link to user
15
     *
16
     * @var string
17
     */
18
    protected $identity;
19
20
    public function __construct($identity)
21
    {
22
        $this->identity = $identity;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getToken()
29
    {
30
        return $this->identity;
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function getUserId()
37
    {
38
        // not supported for OpenId
39
        return null;
40
    }
41
}
42