| 1 | <?php namespace Arcanedev\Socialite\OAuth\Two; |
||
| 11 | class User extends AbstractUser |
||
| 12 | { |
||
| 13 | /* ------------------------------------------------------------------------------------------------ |
||
| 14 | | Properties |
||
| 15 | | ------------------------------------------------------------------------------------------------ |
||
| 16 | */ |
||
| 17 | /** |
||
| 18 | * The refresh token that can be exchanged for a new access token. |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | public $refreshToken; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * The number of seconds the access token is valid for. |
||
| 26 | * |
||
| 27 | * @var int |
||
| 28 | */ |
||
| 29 | public $expiresIn; |
||
| 30 | |||
| 31 | /* ------------------------------------------------------------------------------------------------ |
||
| 32 | | Getters & Setters |
||
| 33 | | ------------------------------------------------------------------------------------------------ |
||
| 34 | */ |
||
| 35 | /** |
||
| 36 | * Set the token on the user. |
||
| 37 | * |
||
| 38 | * @param string $token |
||
| 39 | * |
||
| 40 | * @return self |
||
| 41 | */ |
||
| 42 | 12 | public function setToken($token) |
|
| 48 | |||
| 49 | /** |
||
| 50 | * Set the refresh token required to obtain a new access token. |
||
| 51 | * |
||
| 52 | * @param string $refreshToken |
||
| 53 | * |
||
| 54 | * @return self |
||
| 55 | */ |
||
| 56 | 12 | public function setRefreshToken($refreshToken) |
|
| 62 | |||
| 63 | /** |
||
| 64 | * Set the number of seconds the access token is valid for as measured from when the access token was granted. |
||
| 65 | * |
||
| 66 | * @param int $expiresIn |
||
| 67 | * |
||
| 68 | * @return self |
||
| 69 | */ |
||
| 70 | 12 | public function setExpiresIn($expiresIn) |
|
| 76 | |||
| 77 | /** |
||
| 78 | * Set the raw user array from the provider. |
||
| 79 | * |
||
| 80 | * @param array $user |
||
| 81 | * |
||
| 82 | * @return self |
||
| 83 | */ |
||
| 84 | 6 | public function setRaw(array $user) |
|
| 88 | } |
||
| 89 |