Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
authflow.php
1
<?php
2
3
namespace
Bitrix\Socialservices\Controller
;
4
5
use \Bitrix\Main\Context,
6
\
Bitrix\Main\Engine
,
7
\
Bitrix\Main\Engine\ActionFilter\Csrf
,
8
\
Bitrix\Main\Engine\ActionFilter\Authentication
;
9
10
11
class
AuthFlow
extends
Engine\Controller
12
{
13
private
const
APPLE_OAUTH_URL =
'https://appleid.apple.com/auth/authorize'
;
14
15
public
function
configureActions
(): array
16
{
17
return
[
18
'signInApple'
=> [
19
'-prefilters'
=> [
20
Csrf::class,
21
Authentication::class
22
]
23
]
24
];
25
}
26
27
public
function
signInAppleAction
(): void
28
{
29
$redirectUrl = $this->
getRequest
()->getQuery(
'url'
);
30
31
if
(strpos($redirectUrl, self::APPLE_OAUTH_URL) === 0)
32
{
33
LocalRedirect($redirectUrl,
true
);
34
die();
35
}
36
}
37
}
Bitrix\Main\Engine\ActionFilter\Authentication
Definition
authentication.php:14
Bitrix\Main\Engine\ActionFilter\Csrf
Definition
csrf.php:14
Bitrix\Main\Engine\Controller
Definition
controller.php:32
Bitrix\Main\Engine\Controller\getRequest
getRequest()
Definition
controller.php:351
Bitrix\Socialservices\Controller\AuthFlow
Definition
authflow.php:12
Bitrix\Socialservices\Controller\AuthFlow\signInAppleAction
signInAppleAction()
Definition
authflow.php:27
Bitrix\Socialservices\Controller\AuthFlow\configureActions
configureActions()
Definition
authflow.php:15
Bitrix\Main\Engine
Definition
action.php:3
Bitrix\Socialservices\Controller
Definition
authflow.php:3
modules
socialservices
lib
controller
authflow.php
Создано системой
1.10.0