| @@ 21-62 (lines=42) @@ | ||
| 18 | ||
| 19 | namespace fkooman\RemoteStorage\OAuth; |
|
| 20 | ||
| 21 | class AccessToken |
|
| 22 | { |
|
| 23 | /** @var string */ |
|
| 24 | private $clientId; |
|
| 25 | ||
| 26 | /** @var string */ |
|
| 27 | private $userId; |
|
| 28 | ||
| 29 | /** @var int */ |
|
| 30 | private $issuedAt; |
|
| 31 | ||
| 32 | /** @var string */ |
|
| 33 | private $scope; |
|
| 34 | ||
| 35 | public function __construct($clientId, $userId, $issuedAt, $scope) |
|
| 36 | { |
|
| 37 | $this->clientId = $clientId; |
|
| 38 | $this->userId = $userId; |
|
| 39 | $this->issuedAt = $issuedAt; |
|
| 40 | $this->scope = $scope; |
|
| 41 | } |
|
| 42 | ||
| 43 | public function getClientId() |
|
| 44 | { |
|
| 45 | return $this->clientId; |
|
| 46 | } |
|
| 47 | ||
| 48 | public function getUserId() |
|
| 49 | { |
|
| 50 | return $this->userId; |
|
| 51 | } |
|
| 52 | ||
| 53 | public function getIssuedAt() |
|
| 54 | { |
|
| 55 | return $this->issuedAt; |
|
| 56 | } |
|
| 57 | ||
| 58 | public function getScope() |
|
| 59 | { |
|
| 60 | return $this->scope; |
|
| 61 | } |
|
| 62 | } |
|
| 63 | ||
| @@ 21-62 (lines=42) @@ | ||
| 18 | ||
| 19 | namespace fkooman\RemoteStorage\OAuth; |
|
| 20 | ||
| 21 | class Approval |
|
| 22 | { |
|
| 23 | /** @var string */ |
|
| 24 | private $userId; |
|
| 25 | ||
| 26 | /** @var string */ |
|
| 27 | private $clientId; |
|
| 28 | ||
| 29 | /** @var string */ |
|
| 30 | private $responseType; |
|
| 31 | ||
| 32 | /** @var string */ |
|
| 33 | private $scope; |
|
| 34 | ||
| 35 | public function __construct($userId, $clientId, $responseType, $scope) |
|
| 36 | { |
|
| 37 | $this->userId = $userId; |
|
| 38 | $this->clientId = $clientId; |
|
| 39 | $this->responseType = $responseType; |
|
| 40 | $this->scope = $scope; |
|
| 41 | } |
|
| 42 | ||
| 43 | public function getUserId() |
|
| 44 | { |
|
| 45 | return $this->userId; |
|
| 46 | } |
|
| 47 | ||
| 48 | public function getClientId() |
|
| 49 | { |
|
| 50 | return $this->clientId; |
|
| 51 | } |
|
| 52 | ||
| 53 | public function getResponseType() |
|
| 54 | { |
|
| 55 | return $this->responseType; |
|
| 56 | } |
|
| 57 | ||
| 58 | public function getScope() |
|
| 59 | { |
|
| 60 | return $this->scope; |
|
| 61 | } |
|
| 62 | } |
|
| 63 | ||