From d5be486d398737faa2d41c132ab58ee3f901af4f Mon Sep 17 00:00:00 2001 From: Mudi Ugbowanko Date: Mon, 22 Sep 2014 12:27:08 +0100 Subject: [PATCH] set token to authenticated --- src/AccessProvider.php | 1 + test/OAuth/GrantFlowTest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/AccessProvider.php b/src/AccessProvider.php index 723e979..e7b0e89 100644 --- a/src/AccessProvider.php +++ b/src/AccessProvider.php @@ -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; } diff --git a/test/OAuth/GrantFlowTest.php b/test/OAuth/GrantFlowTest.php index 8f999a9..17bec20 100644 --- a/test/OAuth/GrantFlowTest.php +++ b/test/OAuth/GrantFlowTest.php @@ -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()); };