mirror of
https://github.com/elyby/accounts.git
synced 2024-11-23 05:33:20 +05:30
Fixes #11. Strip slashes from profile UUID in the authserver's response
This commit is contained in:
parent
1fee15f74a
commit
9c6d9409ea
@ -34,7 +34,7 @@ class AuthenticateData {
|
||||
'accessToken' => $this->accessToken,
|
||||
'clientToken' => $this->clientToken,
|
||||
'selectedProfile' => [
|
||||
'id' => $this->account->uuid,
|
||||
'id' => str_replace('-', '', $this->account->uuid),
|
||||
'name' => $this->account->username,
|
||||
'legacy' => false,
|
||||
],
|
||||
|
@ -27,9 +27,9 @@ class AuthenticationFormTest extends TestCase {
|
||||
$authForm->password = 'password_0';
|
||||
$authForm->clientToken = Uuid::uuid4()->toString();
|
||||
$result = $authForm->authenticate()->getResponseData();
|
||||
$this->assertRegExp('/^[\w=-]+\.[\w=-]+\.[\w=-]+$/', $result['accessToken']);
|
||||
$this->assertMatchesRegularExpression('/^[\w=-]+\.[\w=-]+\.[\w=-]+$/', $result['accessToken']);
|
||||
$this->assertSame($authForm->clientToken, $result['clientToken']);
|
||||
$this->assertSame('df936908-b2e1-544d-96f8-2977ec213022', $result['selectedProfile']['id']);
|
||||
$this->assertSame('df936908b2e1544d96f82977ec213022', $result['selectedProfile']['id']);
|
||||
$this->assertSame('Admin', $result['selectedProfile']['name']);
|
||||
$this->assertFalse($result['selectedProfile']['legacy']);
|
||||
$this->assertTrue(OauthSession::find()->andWhere([
|
||||
|
Loading…
Reference in New Issue
Block a user