mirror of
https://github.com/elyby/accounts.git
synced 2024-12-25 22:59:53 +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());
|
||||
}
|
||||
|
||||
public function actionDevice(): array {
|
||||
public function actionDevicecode(): array {
|
||||
return $this->oauthProcess->deviceCode($this->getServerRequest());
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ use Codeception\Example;
|
||||
final class DeviceCodeCest {
|
||||
|
||||
public function initiateFlow(FunctionalTester $I): void {
|
||||
$I->sendPOST('/api/oauth2/v1/device', [
|
||||
$I->sendPOST('/api/oauth2/v1/devicecode', [
|
||||
'client_id' => 'ely',
|
||||
'scope' => 'account_info minecraft_server_session',
|
||||
]);
|
||||
@ -56,7 +56,7 @@ final class DeviceCodeCest {
|
||||
#[Examples(false)]
|
||||
public function finishFlowWithApprovedCode(FunctionalTester $I, Example $case): void {
|
||||
// Initialize flow
|
||||
$I->sendPOST('/api/oauth2/v1/device', [
|
||||
$I->sendPOST('/api/oauth2/v1/devicecode', [
|
||||
'client_id' => 'ely',
|
||||
'scope' => 'account_info minecraft_server_session',
|
||||
]);
|
||||
@ -95,7 +95,7 @@ final class DeviceCodeCest {
|
||||
}
|
||||
|
||||
public function getAnErrorForUnknownClient(FunctionalTester $I): void {
|
||||
$I->sendPOST('/api/oauth2/v1/device', [
|
||||
$I->sendPOST('/api/oauth2/v1/devicecode', [
|
||||
'client_id' => 'invalid-client',
|
||||
'scope' => 'account_info minecraft_server_session',
|
||||
]);
|
||||
@ -106,7 +106,7 @@ final class DeviceCodeCest {
|
||||
}
|
||||
|
||||
public function getAnErrorForInvalidScopes(FunctionalTester $I): void {
|
||||
$I->sendPOST('/api/oauth2/v1/device', [
|
||||
$I->sendPOST('/api/oauth2/v1/devicecode', [
|
||||
'client_id' => 'ely',
|
||||
'scope' => 'unknown-scope',
|
||||
]);
|
||||
|
Loading…
Reference in New Issue
Block a user