Skip to content

Commit

Permalink
Check for error invalid_grant instead of invalid_request
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgarlag committed Apr 22, 2024
1 parent c1ac65c commit 4a579eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Integration/AuthorizationServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public function testDifferentClientRefreshGrant(): void
$response = $this->handleTokenRequest($request);

// Response assertions.
$this->assertSame('invalid_request', $response['error']);
$this->assertSame('invalid_grant', $response['error']);
$this->assertSame('The refresh token is invalid.', $response['error_description']);
$this->assertSame('Token is not linked to client', $response['hint']);
}
Expand Down Expand Up @@ -422,7 +422,7 @@ public function testExpiredRefreshGrant(): void
$response = $this->handleTokenRequest($request);

// Response assertions.
$this->assertSame('invalid_request', $response['error']);
$this->assertSame('invalid_grant', $response['error']);
$this->assertSame('The refresh token is invalid.', $response['error_description']);
$this->assertSame('Token has expired', $response['hint']);
}
Expand All @@ -439,7 +439,7 @@ public function testRevokedRefreshGrant(): void
$response = $this->handleTokenRequest($request);

// Response assertions.
$this->assertSame('invalid_request', $response['error']);
$this->assertSame('invalid_grant', $response['error']);
$this->assertSame('The refresh token is invalid.', $response['error_description']);
$this->assertSame('Token has been revoked', $response['hint']);
}
Expand Down Expand Up @@ -468,7 +468,7 @@ public function testInvalidPayloadRefreshGrant(): void
$response = $this->handleTokenRequest($request);

// Response assertions.
$this->assertSame('invalid_request', $response['error']);
$this->assertSame('invalid_grant', $response['error']);
$this->assertSame('The refresh token is invalid.', $response['error_description']);
$this->assertSame('Cannot decrypt the refresh token', $response['hint']);
}
Expand Down

0 comments on commit 4a579eb

Please sign in to comment.