Fix issuing of token during IndieAuth sign in
This commit is contained in:
parent
8d781b7009
commit
4a0bc6005a
2 changed files with 12 additions and 12 deletions
|
@ -31,16 +31,15 @@ class TokenEndpointTest extends TestCase
|
|||
$mockGuzzleClient = new Client(['handler' => $handlerStack]);
|
||||
$this->app->instance(Client::class, $mockGuzzleClient);
|
||||
$response = $this->post('/api/token', [
|
||||
'me' => config('app.url'),
|
||||
'code' => 'abc123',
|
||||
'redirect_uri' => config('app.url') . '/indieauth-callback',
|
||||
'client_id' => config('app.url') . '/micropub-client',
|
||||
'state' => random_int(1000, 10000),
|
||||
]);
|
||||
$response->assertJson([
|
||||
'me' => config('app.url'),
|
||||
'scope' => 'create update',
|
||||
'grant_type' => 'authorization_code',
|
||||
'code' => '1234567890',
|
||||
'redirect_uri' => 'https://example.com/auth/callback',
|
||||
'client_id' => 'https://example.com',
|
||||
'code_verifier' => '1234567890',
|
||||
]);
|
||||
|
||||
$this->assertSame(config('app.url'), $response->json('me'));
|
||||
$this->assertNotEmpty($response->json('access_token'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue