예제 #1
0
     $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'));
예제 #2
0
<?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";
예제 #3
0
파일: bitrix24.php 프로젝트: ASDAFF/open_bx
<?
/*
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");
?>
예제 #4
0
파일: box.php 프로젝트: mrdeadmouse/u136006
<?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";
예제 #5
0
<?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";
예제 #6
0
<?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";
예제 #7
0
파일: liveid.php 프로젝트: Satariall/izurit
<?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";
예제 #8
0
파일: google.php 프로젝트: nProfessor/Mytb
<?
/*
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");
?>
예제 #9
0
<?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";
예제 #10
0
<?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("Office365");
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include/epilog_after.php";
예제 #11
0
파일: google.php 프로젝트: ASDAFF/entask.ru
$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");
?>
예제 #12
0
<?
/*
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("socialservices"))
{
	$oAuthManager = new CSocServAuthManager();
	$oAuthManager->Authorize("Vkontakte");
}

require_once($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/include/epilog_after.php");
?>
예제 #13
0
<?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";
예제 #14
0
파일: yandex.php 프로젝트: Satariall/izurit
<?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";