Skip to content

Commit

Permalink
set token to authenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
Mudi Ugbowanko committed Sep 22, 2014
1 parent 227c98d commit d5be486
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/AccessProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public function getSecurityToken($accessCode) {
$client = $this->getClient($credentials->getClientId());

$token = new SecurityToken($client, []);
$token->setAuthenticated(true);
$token->setUser($user);
return $token;
}
Expand Down
1 change: 1 addition & 0 deletions test/OAuth/GrantFlowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public function testFlow($expectToSucceed, $clientId, $redirectUri, $username, $
$accessCode = $credentials['access_code'];
$verifyAccessTokenCb = function(Application $app) use ($accessCode, $username, $clientId){
$token = $app['security']->getToken();
$this->assertTrue($token->isAuthenticated());
$this->assertEquals($username, $token->getUsername());
$this->assertEquals($clientId, $token->getClient()->getId());
};
Expand Down

0 comments on commit d5be486

Please sign in to comment.