2016-02-14 23:20:10 +05:30
|
|
|
<?php
|
|
|
|
namespace tests\codeception\api\_pages;
|
|
|
|
|
|
|
|
use yii\codeception\BasePage;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @property \tests\codeception\api\FunctionalTester $actor
|
|
|
|
*/
|
|
|
|
class OauthRoute extends BasePage {
|
|
|
|
|
|
|
|
public function validate($queryParams) {
|
2016-07-27 03:41:13 +05:30
|
|
|
$this->route = '/oauth2/v1/validate';
|
2016-02-14 23:20:10 +05:30
|
|
|
$this->actor->sendGET($this->getUrl($queryParams));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function complete($queryParams = [], $postParams = []) {
|
2016-07-27 03:41:13 +05:30
|
|
|
$this->route = '/oauth2/v1/complete';
|
2016-02-14 23:20:10 +05:30
|
|
|
$this->actor->sendPOST($this->getUrl($queryParams), $postParams);
|
|
|
|
}
|
|
|
|
|
2016-02-23 03:19:46 +05:30
|
|
|
public function issueToken($postParams = []) {
|
2016-07-27 03:41:13 +05:30
|
|
|
$this->route = '/oauth2/v1/token';
|
2016-02-23 03:19:46 +05:30
|
|
|
$this->actor->sendPOST($this->getUrl(), $postParams);
|
|
|
|
}
|
|
|
|
|
2016-02-14 23:20:10 +05:30
|
|
|
}
|