| 1 | <?php |
||
| 21 | class AuthFactory |
||
| 22 | { |
||
| 23 | use \Teto\Object\PrivateGetter; |
||
| 24 | |||
| 25 | /** @var Client */ |
||
| 26 | private $client; |
||
| 27 | /** @var string */ |
||
| 28 | private $client_id; |
||
| 29 | /** @var string */ |
||
| 30 | private $client_secret; |
||
| 31 | /** @var Grant */ |
||
| 32 | private $grant; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param Client $client |
||
| 36 | * @param string $client_id |
||
| 37 | * @param string $client_secret |
||
| 38 | 5 | */ |
|
| 39 | public function __construct(Client $client, $client_id, $client_secret) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param Grant $grant |
||
| 48 | 4 | */ |
|
| 49 | public function setGrant(Grant $grant) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return Authorization |
||
| 56 | */ |
||
| 57 | public function authorize(Scope $scope) |
||
| 67 | } |
||
| 68 |