本文整理汇总了PHP中Authorization::requireNonceParam方法的典型用法代码示例。如果您正苦于以下问题:PHP Authorization::requireNonceParam方法的具体用法?PHP Authorization::requireNonceParam怎么用?PHP Authorization::requireNonceParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Authorization
的用法示例。
在下文中一共展示了Authorization::requireNonceParam方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
// Initiate the request handler which deals with $_GET, $_POST, etc
//$this->authserver->getRequest() = new League\OAuth2\Server\Util\Request($_GET);
// Initiate a new database connection
//$db = new League\OAuth2\Server\Storage\PDO\Db('mysql://HLTT7BQtMNFyT:fYu354ssAPXQIIByv@localhost/govid');
// Create the auth server, the three parameters passed are references
// to the storage models
$this->authserver = new League\OAuth2\Server\Authorization(new Client(), new OauthSession(), new Scope());
// Enable the authorization code grant type
$this->authserver->addGrantType(new League\OAuth2\Server\Grant\AuthCode());
$this->authserver->setRequest(new League\OAuth2\Server\Util\Request($_GET, $_POST, array(), array(), array('HTTP_AUTHORIZATION' => $_ENV['HTTP_AUTHORIZATION']), array('Authorization' => $_ENV['HTTP_AUTHORIZATION'])));
//$this->authserver->setScopeDelimeter($scopeDelimeter = ',');
$this->authserver->requireStateParam();
$this->authserver->requireNonceParam();
$this->authserver->setDefaultScope('openid');
}