本文整理汇总了PHP中SecurityToken::getAppUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP SecurityToken::getAppUrl方法的具体用法?PHP SecurityToken::getAppUrl怎么用?PHP SecurityToken::getAppUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SecurityToken
的用法示例。
在下文中一共展示了SecurityToken::getAppUrl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getKey
protected function getKey($userId, SecurityToken $token)
{
$pos = strrpos($userId, ':');
if ($pos !== false) {
$userId = substr($userId, $pos + 1);
}
if ($token->getAppId()) {
return self::$TOKEN_PREFIX . $token->getAppId() . '_' . $userId;
}
return self::$TOKEN_PREFIX . $token->getAppUrl() . '_' . $userId;
}
示例2: getKey
/**
* @return string
*/
private function getKey($userId, SecurityToken $token)
{
$pos = strrpos($userId, ':');
if ($pos !== false) {
$userId = substr($userId, $pos + 1);
}
if ($token->getAppId()) {
return DefaultInvalidateService::$TOKEN_PREFIX . $token->getAppId() . '_' . $userId;
}
return DefaultInvalidateService::$TOKEN_PREFIX . $token->getAppUrl() . '_' . $userId;
}
示例3: addIdentityParams
private static function addIdentityParams(array &$params, SecurityToken $token)
{
$params['opensocial_owner_id'] = $token->getOwnerId();
$params['opensocial_viewer_id'] = $token->getViewerId();
$params['opensocial_app_id'] = $token->getAppId();
$params['opensocial_app_url'] = $token->getAppUrl();
}
示例4: addOpenSocialParams
private function addOpenSocialParams(&$msgParams, SecurityToken $token, $signOwner, $signViewer)
{
if ($signOwner) {
$owner = $token->getOwnerId();
if ($owner != null) {
$msgParams[SigningFetcher::$OPENSOCIAL_OWNERID] = $owner;
}
}
if ($signViewer) {
$viewer = $token->getViewerId();
if ($viewer != null) {
$msgParams[SigningFetcher::$OPENSOCIAL_VIEWERID] = $viewer;
}
}
if ($signOwner || $signViewer) {
$app = $token->getAppId();
if ($app != null) {
$msgParams[SigningFetcher::$OPENSOCIAL_APPID] = $app;
}
$url = $token->getAppUrl();
if ($url != null) {
$msgParams[SigningFetcher::$OPENSOCIAL_APPURL] = $url;
}
}
}