Skip to content

Commit

Permalink
Add test for parsed attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ElisDN committed May 3, 2021
1 parent a603133 commit 244b055
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/AuthorizationValidators/BearerTokenValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public function testBearerTokenValidatorAcceptsValidToken()
$response = $bearerTokenValidator->validateAuthorization($request);

$this->assertArrayHasKey('authorization', $response->getHeaders());

$this->assertEquals('token-id', $response->getAttribute('oauth_access_token_id'));
$this->assertEquals('client-id', $response->getAttribute('oauth_client_id'));
$this->assertEquals('user-id', $response->getAttribute('oauth_user_id'));
$this->assertEquals('scope1 scope2 scope3 scope4', $response->getAttribute('oauth_scopes'));
}

public function testBearerTokenValidatorRejectsExpiredToken()
Expand Down

0 comments on commit 244b055

Please sign in to comment.