1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
openid.php
См. документацию.
1<?
3
5{
6 public function Authorize($identity=false, $var=false)
7 {
8 if($var === false)
9 $var = 'OPENID_IDENTITY_OPENID';
10
12 if($step > 0)
13 {
14 $obOpenID = new COpenIDClient();
15
16 if($step == 2)
17 {
18 return $obOpenID->Authorize();
19 }
20 elseif($step == 1)
21 {
22 if($identity === false || is_array($identity))
23 {
24 $identity = $_REQUEST[$var];
25 }
26
27 $return_to = CSocServUtil::GetCurUrl("auth_service_id=".urlencode($_REQUEST["auth_service_id"])."&check_key=".\CSocServAuthManager::getUniqueKey(), array("auth_service_error", "auth_service_id", "login"));
28
29 if($url = $obOpenID->GetRedirectUrl($identity, $return_to))
30 LocalRedirect($url, true);
31 else
32 LocalRedirect(CSocServUtil::GetCurUrl("auth_service_id=".urlencode($_REQUEST["auth_service_id"])."&auth_service_error=1"));
33 return false;
34 }
35 }
36 return false;
37 }
38
39 public function GetFormHtml($arParams)
40 {
41 return '
42<span class="bx-ss-icon openid"></span>
43<span>'.'OpenID:'.'</span>
44<input type="text" name="OPENID_IDENTITY_OPENID" value="'.($arParams["LAST_LOGIN"] ?? '').'" size="30" />
46<input type="hidden" name="auth_service_error" value="" />
47<input type="submit" class="button" name="" value="'.GetMessage("socserv_openid_login").'" />
48';
49 }
50}
51
53{
54 public function Authorize($identity=false, $var=false)
55 {
56 if($identity === false || is_array($identity))
57 $identity = "http://openid.yandex.ru/".$_REQUEST['OPENID_IDENTITY_YANDEX'];
58
59 return parent::Authorize($identity, 'OPENID_IDENTITY_YANDEX');
60 }
61
62 public function GetFormHtml($arParams)
63 {
64 $login = '';
65 $matches = array();
66 if(preg_match('#openid.yandex.ru/([^/$]+)#i', $arParams["~LAST_LOGIN"], $matches))
67 $login = $matches[1];
68 return '
69<span class="bx-ss-icon yandex"></span>
70<input type="text" name="OPENID_IDENTITY_YANDEX" value="'.htmlspecialcharsbx($login).'" size="20" />
71<span>@yandex.ru</span>
73<input type="hidden" name="auth_service_error" value="" />
74<input type="submit" class="button" name="" value="'.GetMessage("socserv_openid_login").'" />
75';
76 }
77}
78
80{
81 public function Authorize($identity=false, $var=false)
82 {
83 if($identity === false || is_array($identity))
84 $identity = "http://openid.mail.ru/mail/".$_REQUEST['OPENID_IDENTITY_MAILRU'];
85
86 return parent::Authorize($identity, 'OPENID_IDENTITY_MAILRU');
87 }
88
89 public function GetFormHtml($arParams)
90 {
91 $login = '';
92 $matches = array();
93 if(preg_match('#openid.mail.ru/mail/([^/$]+)#i', $arParams["~LAST_LOGIN"] ?? '', $matches))
94 $login = $matches[1];
95
96 return '
97<span class="bx-ss-icon openid-mail-ru"></span>
98<input type="text" name="OPENID_IDENTITY_MAILRU" value="'.htmlspecialcharsbx($login).'" size="20" />
99<span>@mail.ru</span>
101<input type="hidden" name="auth_service_error" value="" />
102<input type="submit" class="button" name="" value="'.GetMessage("socserv_openid_login").'" />
103';
104 }
105}
106
108{
109 public function Authorize($identity=false, $var=false)
110 {
111 if($identity === false || is_array($identity))
112 $identity = $_REQUEST['OPENID_IDENTITY_LIVEJOURNAL'].".livejournal.com";
113
114 return parent::Authorize($identity, 'OPENID_IDENTITY_LIVEJOURNAL');
115 }
116
117 public function GetFormHtml($arParams)
118 {
119 $login = '';
120 $matches = array();
121 if(preg_match('#([^\.]+).livejournal.com#i', $arParams["~LAST_LOGIN"] ?? '', $matches))
122 $login = $matches[1];
123 return '
124<span class="bx-ss-icon livejournal"></span>
125<input type="text" name="OPENID_IDENTITY_LIVEJOURNAL" value="'.htmlspecialcharsbx($login).'" size="20" />
126<span>.livejournal.com</span>
128<input type="hidden" name="auth_service_error" value="" />
129<input type="submit" class="button" name="" value="'.GetMessage("socserv_openid_login").'" />
130';
131 }
132}
133
135{
136 public function Authorize($identity=false, $var=false)
137 {
138 if($identity === false || is_array($identity))
139 $identity = "http://www.liveinternet.ru/users/".$_REQUEST['OPENID_IDENTITY_LIVEINTERNET']."/";
140
141 return parent::Authorize($identity, 'OPENID_IDENTITY_LIVEINTERNET');
142 }
143
144 public function GetFormHtml($arParams)
145 {
146 $login = '';
147 $matches = array();
148 if(preg_match('#www.liveinternet.ru/users/([^/$]+)#i', $arParams["~LAST_LOGIN"] ?? '', $matches))
149 $login = $matches[1];
150 return '
151<span class="bx-ss-icon liveinternet"></span>
152<span>liveinternet.ru/users/</span>
153<input type="text" name="OPENID_IDENTITY_LIVEINTERNET" value="'.htmlspecialcharsbx($login).'" size="15" />
155<input type="hidden" name="auth_service_error" value="" />
156<input type="submit" class="button" name="" value="'.GetMessage("socserv_openid_login").'" />
157';
158 }
159}
160
162{
163 public function Authorize($identity=false, $var=false)
164 {
165 if($identity === false || is_array($identity))
166 $identity = "http://".$_REQUEST['OPENID_IDENTITY_BLOGGER'].".blogspot.com/";
167
168 return parent::Authorize($identity, 'OPENID_IDENTITY_BLOGGER');
169 }
170
171 public function GetFormHtml($arParams)
172 {
173 $login = '';
174 $matches = array();
175 if(preg_match('#([^\.]+).blogspot.com#i', $arParams["~LAST_LOGIN"] ?? '', $matches))
176 $login = $matches[1];
177 return '
178<span class="bx-ss-icon blogger"></span>
179<input type="text" name="OPENID_IDENTITY_BLOGGER" value="'.htmlspecialcharsbx($login).'" size="20" />
180<span>.blogspot.com</span>
182<input type="hidden" name="auth_service_error" value="" />
183<input type="submit" class="button" name="" value="'.GetMessage("socserv_openid_login").'" />
184';
185 }
186}
187
189{
190 public function Authorize($identity=false, $var=false)
191 {
192 if($identity === false || is_array($identity))
193 $identity = "http://id.rambler.ru/users/".$_REQUEST['OPENID_IDENTITY_RAMBLER'];
194
195 return parent::Authorize($identity, 'OPENID_IDENTITY_RAMBLER');
196 }
197
198 public function GetFormHtml($arParams)
199 {
200 $login = '';
201 $matches = array();
202 if(preg_match('#id.rambler.ru/users/([^/$]+)#i', $arParams["~LAST_LOGIN"], $matches))
203 $login = $matches[1];
204 return '
205<span class="bx-ss-icon rambler"></span>
206<input type="text" name="OPENID_IDENTITY_RAMBLER" value="'.htmlspecialcharsbx($login).'" size="20" />
207<span>@rambler.ru</span>
209<input type="hidden" name="auth_service_error" value="" />
210<input type="submit" class="button" name="" value="'.GetMessage("socserv_openid_login").'" />
211';
212 }
213}
214
215?>
$arParams
Определения access_dialog.php:21
$login
Определения change_password.php:8
Определения openidclient.php:6
static GetOpenIDAuthStep($request_var='OPENID_IDENTITY')
Определения openidclient.php:326
Определения openid.php:162
Authorize($identity=false, $var=false)
Определения openid.php:163
GetFormHtml($arParams)
Определения openid.php:171
Определения openid.php:135
Authorize($identity=false, $var=false)
Определения openid.php:136
GetFormHtml($arParams)
Определения openid.php:144
Определения openid.php:108
Authorize($identity=false, $var=false)
Определения openid.php:109
GetFormHtml($arParams)
Определения openid.php:117
Определения openid.php:80
Authorize($identity=false, $var=false)
Определения openid.php:81
GetFormHtml($arParams)
Определения openid.php:89
Определения openid.php:5
Authorize($identity=false, $var=false)
Определения openid.php:6
GetFormHtml($arParams)
Определения openid.php:39
Определения openid.php:189
Authorize($identity=false, $var=false)
Определения openid.php:190
GetFormHtml($arParams)
Определения openid.php:198
static GetCurUrl($addParam="", $removeParam=false, $checkOAuthProxy=true)
Определения authmanager.php:1735
Определения openid.php:53
Authorize($identity=false, $var=false)
Определения openid.php:54
GetFormHtml($arParams)
Определения openid.php:62
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$_REQUEST["admin_mnu_menu_id"]
Определения get_menu.php:8
bitrix_sessid_post($varname='sessid', $returnInvocations=false)
Определения tools.php:4700
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
GetMessage($name, $aReplace=null)
Определения tools.php:3397
LocalRedirect($url, $skip_security_check=false, $status="302 Found")
Определения tools.php:4005
$var
Определения payment.php:63
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
$matches
Определения index.php:22
$url
Определения iframe.php:7