mirror of
https://github.com/elyby/accounts.git
synced 2024-12-26 15:10:22 +05:30
Rename device code endpoint to /devicecode
This commit is contained in:
parent
085b4f5ca6
commit
1c11c66b9c
@ -63,7 +63,7 @@ final class AuthorizationController extends Controller {
|
|||||||
return $this->oauthProcess->complete($this->getServerRequest());
|
return $this->oauthProcess->complete($this->getServerRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function actionDevice(): array {
|
public function actionDevicecode(): array {
|
||||||
return $this->oauthProcess->deviceCode($this->getServerRequest());
|
return $this->oauthProcess->deviceCode($this->getServerRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ use Codeception\Example;
|
|||||||
final class DeviceCodeCest {
|
final class DeviceCodeCest {
|
||||||
|
|
||||||
public function initiateFlow(FunctionalTester $I): void {
|
public function initiateFlow(FunctionalTester $I): void {
|
||||||
$I->sendPOST('/api/oauth2/v1/device', [
|
$I->sendPOST('/api/oauth2/v1/devicecode', [
|
||||||
'client_id' => 'ely',
|
'client_id' => 'ely',
|
||||||
'scope' => 'account_info minecraft_server_session',
|
'scope' => 'account_info minecraft_server_session',
|
||||||
]);
|
]);
|
||||||
@ -56,7 +56,7 @@ final class DeviceCodeCest {
|
|||||||
#[Examples(false)]
|
#[Examples(false)]
|
||||||
public function finishFlowWithApprovedCode(FunctionalTester $I, Example $case): void {
|
public function finishFlowWithApprovedCode(FunctionalTester $I, Example $case): void {
|
||||||
// Initialize flow
|
// Initialize flow
|
||||||
$I->sendPOST('/api/oauth2/v1/device', [
|
$I->sendPOST('/api/oauth2/v1/devicecode', [
|
||||||
'client_id' => 'ely',
|
'client_id' => 'ely',
|
||||||
'scope' => 'account_info minecraft_server_session',
|
'scope' => 'account_info minecraft_server_session',
|
||||||
]);
|
]);
|
||||||
@ -95,7 +95,7 @@ final class DeviceCodeCest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getAnErrorForUnknownClient(FunctionalTester $I): void {
|
public function getAnErrorForUnknownClient(FunctionalTester $I): void {
|
||||||
$I->sendPOST('/api/oauth2/v1/device', [
|
$I->sendPOST('/api/oauth2/v1/devicecode', [
|
||||||
'client_id' => 'invalid-client',
|
'client_id' => 'invalid-client',
|
||||||
'scope' => 'account_info minecraft_server_session',
|
'scope' => 'account_info minecraft_server_session',
|
||||||
]);
|
]);
|
||||||
@ -106,7 +106,7 @@ final class DeviceCodeCest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getAnErrorForInvalidScopes(FunctionalTester $I): void {
|
public function getAnErrorForInvalidScopes(FunctionalTester $I): void {
|
||||||
$I->sendPOST('/api/oauth2/v1/device', [
|
$I->sendPOST('/api/oauth2/v1/devicecode', [
|
||||||
'client_id' => 'ely',
|
'client_id' => 'ely',
|
||||||
'scope' => 'unknown-scope',
|
'scope' => 'unknown-scope',
|
||||||
]);
|
]);
|
||||||
|
Loading…
Reference in New Issue
Block a user