本文整理汇总了PHP中OAuth2\Server::getAuthorizeController方法的典型用法代码示例。如果您正苦于以下问题:PHP Server::getAuthorizeController方法的具体用法?PHP Server::getAuthorizeController怎么用?PHP Server::getAuthorizeController使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OAuth2\Server
的用法示例。
在下文中一共展示了Server::getAuthorizeController方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetAuthorizeControllerWithClientStorageAndAuthorizationCodeStorage
public function testGetAuthorizeControllerWithClientStorageAndAuthorizationCodeStorage()
{
// must set AccessToken or AuthorizationCode
$server = new Server();
$server->addStorage($this->getMock('OAuth2\\Storage\\ClientInterface'));
$server->addStorage($this->getMock('OAuth2\\Storage\\AuthorizationCodeInterface'));
$this->assertNotNull($server->getAuthorizeController());
}
示例2: testUsingOpenIDConnectWithAllowImplicitAndAccessTokenResponseTypeIsOkay
public function testUsingOpenIDConnectWithAllowImplicitAndAccessTokenResponseTypeIsOkay()
{
$client = $this->getMock('OAuth2\\Storage\\ClientInterface');
$userclaims = $this->getMock('OAuth2\\OpenID\\Storage\\UserClaimsInterface');
$pubkey = $this->getMock('OAuth2\\Storage\\PublicKeyInterface');
// $token = $this->getMock('OAuth2\Storage\AccessTokenInterface');
$server = new Server(array($client, $userclaims, $pubkey), array('use_openid_connect' => true, 'issuer' => 'someguy', 'allow_implicit' => true));
$token = $this->getMock('OAuth2\\ResponseType\\AccessTokenInterface');
$server->addResponseType($token, 'token');
$server->getAuthorizeController();
$this->assertInstanceOf('OAuth2\\OpenID\\ResponseType\\IdTokenInterface', $server->getResponseType('id_token'));
$this->assertInstanceOf('OAuth2\\OpenID\\ResponseType\\IdTokenTokenInterface', $server->getResponseType('id_token token'));
}