forked from SocialiteProviders/FranceConnect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
User.php
86 lines (72 loc) · 1.51 KB
/
User.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
namespace SocialiteProviders\NcConnect;
use Laravel\Socialite\AbstractUser;
class User extends AbstractUser
{
/**
* The user's id token hint (serve for logout).
*/
public $tokenId;
/**
* The user's access token.
*
* @var string
*/
public $token;
/**
* The refresh token that can be exchanged for a new access token.
*
* @var string
*/
public $refreshToken;
/**
* The number of seconds the access token is valid for.
*
* @var int
*/
public $expiresIn;
/**
* Set the token id on the user.
*
* @param string $tokenId
* @return $this
*/
public function setTokenId($tokenId)
{
$this->tokenId = $tokenId;
return $this;
}
/**
* Set the token on the user.
*
* @param string $token
* @return $this
*/
public function setToken($token)
{
$this->token = $token;
return $this;
}
/**
* Set the refresh token required to obtain a new access token.
*
* @param string $refreshToken
* @return $this
*/
public function setRefreshToken($refreshToken)
{
$this->refreshToken = $refreshToken;
return $this;
}
/**
* Set the number of seconds the access token is valid for.
*
* @param int $expiresIn
* @return $this
*/
public function setExpiresIn($expiresIn)
{
$this->expiresIn = $expiresIn;
return $this;
}
}