当前位置: 首页>>代码示例>>PHP>>正文


PHP CSocServAuthManager::Authorize方法代码示例

本文整理汇总了PHP中CSocServAuthManager::Authorize方法的典型用法代码示例。如果您正苦于以下问题:PHP CSocServAuthManager::Authorize方法的具体用法?PHP CSocServAuthManager::Authorize怎么用?PHP CSocServAuthManager::Authorize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSocServAuthManager的用法示例。


在下文中一共展示了CSocServAuthManager::Authorize方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: htmlspecialcharsbx

     $arResult["~USER_LOGIN"] = $_COOKIE[COption::GetOptionString("main", "cookie_name", "BITRIX_SM") . "_LOGIN"];
 }
 $arResult["USER_LOGIN"] = $arResult["LAST_LOGIN"] = htmlspecialcharsbx($arResult["~USER_LOGIN"]);
 $arResult["~LAST_LOGIN"] = $arResult["~USER_LOGIN"];
 $arResult["AUTH_SERVICES"] = false;
 $arResult["CURRENT_SERVICE"] = false;
 if (!$USER->IsAuthorized() && CModule::IncludeModule("socialservices")) {
     $oAuthManager = new CSocServAuthManager();
     $arServices = $oAuthManager->GetActiveAuthServices($arResult);
     if (!empty($arServices)) {
         $arResult["AUTH_SERVICES"] = $arServices;
         if (isset($_REQUEST["auth_service_id"]) && $_REQUEST["auth_service_id"] != '' && isset($arResult["AUTH_SERVICES"][$_REQUEST["auth_service_id"]])) {
             $arResult["CURRENT_SERVICE"] = $_REQUEST["auth_service_id"];
             if (isset($_REQUEST["auth_service_error"]) && $_REQUEST["auth_service_error"] != '') {
                 $arResult['ERROR_MESSAGE'] = $oAuthManager->GetError($arResult["CURRENT_SERVICE"], $_REQUEST["auth_service_error"]);
             } elseif (!$oAuthManager->Authorize($_REQUEST["auth_service_id"])) {
                 $ex = $APPLICATION->GetException();
                 if ($ex) {
                     $arResult['ERROR_MESSAGE'] = $ex->GetString();
                 }
             }
         }
     }
 }
 $arResult["RND"] = $this->randString();
 $arResult["SECURE_AUTH"] = false;
 if (!CMain::IsHTTPS() && COption::GetOptionString('main', 'use_encrypted_auth', 'N') == 'Y') {
     $sec = new CRsaSecurity();
     if ($arKeys = $sec->LoadKeys()) {
         $sec->SetKeys($arKeys);
         $sec->AddToForm('system_auth_form' . $arResult["RND"], array('USER_PASSWORD'));
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:component.php

示例2: array

<?php

/*
This is callback page for Bitrix24.Net OAuth 2.0 authentication.
Bitrix24.Net redirects only to specific back url set in the OAuth application.
The page opens in popup window after user authorized on Bitrix24.Net.
*/
define("NOT_CHECK_PERMISSIONS", true);
if (isset($_REQUEST["state"]) && is_string($_REQUEST["state"])) {
    $arState = array();
    parse_str($_REQUEST["state"], $arState);
    if (isset($arState['site_id']) && is_string($arState['site_id'])) {
        $site = substr(preg_replace("/[^a-z0-9_]/i", "", $arState['site_id']), 0, 2);
        define("SITE_ID", $site);
    }
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php";
if (CModule::IncludeModule("socialservices")) {
    $oAuthManager = new CSocServAuthManager();
    $oAuthManager->Authorize("Bitrix24Net");
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:Satariall,项目名称:izurit,代码行数:22,代码来源:bitrix24net.php

示例3: array

<?
/*
This is callback page for Google OAuth 2.0 authentication.
Google redirects only to specific back url set in the OAuth application.
The page opens in popup window after user authorized on Google.
*/
define("NOT_CHECK_PERMISSIONS", true);
if(isset($_REQUEST["state"]) && is_string($_REQUEST["state"]))
{
	$arState = array();
	parse_str($_REQUEST["state"], $arState);

	if(isset($arState['site_id']))
	{
		$site = substr(preg_replace("/[^a-z0-9_]/i", "", $arState['site_id']), 0, 2);
		define("SITE_ID", $site);
	}
}

require_once($_SERVER['DOCUMENT_ROOT']."/freetrix/modules/main/include/prolog_before.php");

if(CModule::IncludeModule("socialservices"))
{
	$oAuthManager = new CSocServAuthManager();
	$oAuthManager->Authorize("Freetrix24OAuth");
}

require_once($_SERVER['DOCUMENT_ROOT']."/freetrix/modules/main/include/epilog_after.php");
?>
开发者ID:ASDAFF,项目名称:open_bx,代码行数:29,代码来源:bitrix24.php

示例4: array

<?php

/*
This is callback page for Dropbox OAuth 2.0 authentication.
Dropbox redirects only to specific back url set in the OAuth application.
The page opens in popup window after user authorized on LiveID.
*/
define("NOT_CHECK_PERMISSIONS", true);
if (isset($_REQUEST["state"]) && is_string($_REQUEST["state"])) {
    $arState = array();
    parse_str($_REQUEST["state"], $arState);
    if (isset($arState['site_id']) && is_string($arState['site_id'])) {
        $site = substr(preg_replace("/[^a-z0-9_]/i", "", $arState['site_id']), 0, 2);
        define("SITE_ID", $site);
    }
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php";
if (CModule::IncludeModule("socialservices")) {
    $oAuthManager = new CSocServAuthManager();
    $oAuthManager->Authorize("Box");
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:22,代码来源:box.php

示例5: array

<?php

/*
This is callback page for MyMailRu OAuth 2.0 authentication.
MyMailRu redirects only to specific back url set in the OAuth application.
The page opens in popup window after user authorized on MyMailRu.
*/
define("NOT_CHECK_PERMISSIONS", true);
if (isset($_REQUEST["state"]) && is_string($_REQUEST["state"])) {
    $arState = array();
    parse_str($_REQUEST["state"], $arState);
    if (isset($arState['site_id']) && is_string($arState['site_id'])) {
        $site = substr(preg_replace("/[^a-z0-9_]/i", "", $arState['site_id']), 0, 2);
        define("SITE_ID", $site);
    }
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php";
if (CModule::IncludeModule("socialservices")) {
    $oAuthManager = new CSocServAuthManager();
    $oAuthManager->Authorize("Odnoklassniki");
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:22,代码来源:odnoklassniki.php

示例6: array

<?php

/*
This is callback page for MyMailRu OAuth 2.0 authentication.
MyMailRu redirects only to specific back url set in the OAuth application.
The page opens in popup window after user authorized on MyMailRu.
*/
define("NOT_CHECK_PERMISSIONS", true);
if (isset($_REQUEST["state"]) && is_string($_REQUEST["state"])) {
    $arState = array();
    parse_str($_REQUEST["state"], $arState);
    if (isset($arState['site_id'])) {
        $site = substr(preg_replace("/[^a-z0-9_]/i", "", $arState['site_id']), 0, 2);
        define("SITE_ID", $site);
    }
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php";
if (CModule::IncludeModule("socialservices")) {
    $oAuthManager = new CSocServAuthManager();
    $oAuthManager->Authorize("MyMailRu");
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:spas-viktor,项目名称:books,代码行数:22,代码来源:mailru.php

示例7: array

<?php

/*
This is callback page for LiveID OAuth 2.0 authentication.
LiveID redirects only to specific back url set in the OAuth application.
The page opens in popup window after user authorized on LiveID.
*/
define("NOT_CHECK_PERMISSIONS", true);
if (isset($_REQUEST["state"]) && is_string($_REQUEST["state"])) {
    $arState = array();
    parse_str($_REQUEST["state"], $arState);
    if (isset($arState['site_id']) && is_string($arState['site_id'])) {
        $site = substr(preg_replace("/[^a-z0-9_]/i", "", $arState['site_id']), 0, 2);
        define("SITE_ID", $site);
    }
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php";
if (CModule::IncludeModule("socialservices")) {
    $oAuthManager = new CSocServAuthManager();
    $oAuthManager->Authorize("LiveIDOAuth");
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:Satariall,项目名称:izurit,代码行数:22,代码来源:liveid.php

示例8: array

<?
/*
This is callback page for Google OAuth 2.0 authentication.
Google redirects only to specific back url set in the OAuth application.
The page opens in popup window after user authorized on Google.
*/

if(isset($_REQUEST["state"]))
{
	$arState = array();
	parse_str($_REQUEST["state"], $arState);

	if(isset($arState['site_id']))
		define("SITE_ID", $arState['site_id']);
}

require_once($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/include/prolog_before.php");

$bNewUserReg = (COption::GetOptionString("main", "new_user_registration", "N") == "Y");

if(!$USER->IsAuthorized() && $bNewUserReg && CModule::IncludeModule("tr.socialservices"))
{
	$oAuthManager = new CSocServAuthManager();
	$oAuthManager->Authorize("GoogleOAuth");
}

require_once($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/include/epilog_after.php");
?>
开发者ID:nProfessor,项目名称:Mytb,代码行数:28,代码来源:google.php

示例9: array

<?php

/*
This is callback page for Dropbox OAuth 2.0 authentication.
Dropbox redirects only to specific back url set in the OAuth application.
The page opens in popup window after user authorized on Dropbox.
*/
define("NOT_CHECK_PERMISSIONS", true);
if (isset($_REQUEST["state"]) && is_string($_REQUEST["state"])) {
    $arState = array();
    parse_str($_REQUEST["state"], $arState);
    if (isset($arState['site_id']) && is_string($arState['site_id'])) {
        $site = substr(preg_replace("/[^a-z0-9_]/i", "", $arState['site_id']), 0, 2);
        define("SITE_ID", $site);
    }
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php";
if (CModule::IncludeModule("socialservices")) {
    $oAuthManager = new CSocServAuthManager();
    $oAuthManager->Authorize("Dropbox");
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:Satariall,项目名称:izurit,代码行数:22,代码来源:dropbox.php

示例10: array

$provider = "GoogleOAuth";
if(isset($_REQUEST["state"]) && is_string($_REQUEST["state"]))
{
	$arState = array();
	parse_str($_REQUEST["state"], $arState);

	if(isset($arState['site_id']))
	{
		$site = substr(preg_replace("/[^a-z0-9_]/i", "", $arState['site_id']), 0, 2);
		define("SITE_ID", $site);
	}

	if(isset($arState['provider']) && $arState['provider'] == 'GooglePlusOAuth')
	{
		$provider = 'GooglePlusOAuth';
	}
}

define('SOCSERV_CURRENT_PROVIDER', $provider);

require_once($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/include/prolog_before.php");

if(CModule::IncludeModule("socialservices"))
{
	$oAuthManager = new CSocServAuthManager();
	$oAuthManager->Authorize(SOCSERV_CURRENT_PROVIDER);
}

require_once($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/include/epilog_after.php");
?>
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:30,代码来源:google.php

示例11: array

<?php

/*
This is callback page for Google OAuth 2.0 authentication.
Google redirects only to specific back url set in the OAuth application.
The page opens in popup window after user authorized on Google.
*/
define("NOT_CHECK_PERMISSIONS", true);
if (isset($_REQUEST["state"]) && is_string($_REQUEST["state"])) {
    $arState = array();
    parse_str($_REQUEST["state"], $arState);
    if (isset($arState['site_id'])) {
        $site = substr(preg_replace("/[^a-z0-9_]/i", "", $arState['site_id']), 0, 2);
        define("SITE_ID", $site);
    }
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php";
if (CModule::IncludeModule("socialservices")) {
    $oAuthManager = new CSocServAuthManager();
    $oAuthManager->Authorize("Bitrix24OAuth");
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:spas-viktor,项目名称:books,代码行数:22,代码来源:bitrix24.php

示例12: array

<?php

/*
This is callback page for Yandex OAuth 2.0 authentication.
Dropbox redirects only to specific back url set in the OAuth application.
The page opens in popup window after user authorized on Yandex.
*/
define("NOT_CHECK_PERMISSIONS", true);
if (isset($_REQUEST["state"]) && is_string($_REQUEST["state"])) {
    $arState = array();
    parse_str($_REQUEST["state"], $arState);
    if (isset($arState['site_id']) && is_string($arState['site_id'])) {
        $site = substr(preg_replace("/[^a-z0-9_]/i", "", $arState['site_id']), 0, 2);
        define("SITE_ID", $site);
    }
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/prolog_before.php";
if (CModule::IncludeModule("socialservices")) {
    $oAuthManager = new CSocServAuthManager();
    $oAuthManager->Authorize("YandexOAuth");
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:Satariall,项目名称:izurit,代码行数:22,代码来源:yandex.php


注:本文中的CSocServAuthManager::Authorize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。