isAuthenticated() публичный метод

Checks if the user is authenticated or not.
public isAuthenticated ( ) : boolean
Результат boolean True if the user is authenticated
Пример #1
0
     # header('Cache-Control: no-cache, must-revalidate');
     # header('Location: ' . $sloBuiltUrl);
     # exit();
 } else {
     if (isset($_GET['acs'])) {
         if (isset($_SESSION) && isset($_SESSION['AuthNRequestID'])) {
             $requestID = $_SESSION['AuthNRequestID'];
         } else {
             $requestID = null;
         }
         $auth->processResponse($requestID);
         $errors = $auth->getErrors();
         if (!empty($errors)) {
             print_r('<p>' . implode(', ', $errors) . '</p>');
         }
         if (!$auth->isAuthenticated()) {
             echo "<p>Not authenticated</p>";
             exit;
         }
         $_SESSION['samlUserdata'] = $auth->getAttributes();
         $_SESSION['samlNameId'] = $auth->getNameId();
         $_SESSION['samlSessionIndex'] = $auth->getSessionIndex();
         unset($_SESSION['AuthNRequestID']);
         if (isset($_POST['RelayState']) && OneLogin_Saml2_Utils::getSelfURL() != $_POST['RelayState']) {
             $auth->redirectTo($_POST['RelayState']);
         }
     } else {
         if (isset($_GET['sls'])) {
             if (isset($_SESSION) && isset($_SESSION['LogoutRequestID'])) {
                 $requestID = $_SESSION['LogoutRequestID'];
             } else {