Example #1
0
 public function testGetAuthorizationRequestUriForCodeResponseType()
 {
     $config = $this->getConfig();
     $oauth2Client = new OAuth2Client($config);
     $authorizationRequest = new AuthorizationRequest();
     $authorizationRequest->setScope(new Scope(array('scope-token-1', 'scope-token-2')));
     $grant = new AuthorizationCodeGrant(null, $authorizationRequest);
     $uri = $oauth2Client->buildAuthorizationRequestUri($grant);
     $this->assertSame('https://auth.example.com/authorize?response_type=code&client_id=s6BhdRkqt3&scope=scope-token-1+scope-token-2', $uri);
 }