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

Returns if there were any error
public getErrors ( ) : array
Результат array Errors
 private function verificar_errores_onelogin(OneLogin_Saml2_Auth $auth)
 {
     $errors = $auth->getErrors();
     if (!empty($errors)) {
         toba::logger()->error('Errores en el proceso de onelogin: '******'Se produjo un error durante el procedimiento de login, contacte un administrador');
     }
 }
Пример #2
0
     # If LogoutRequest ID need to be saved in order to later validate it, do instead
     # $sloBuiltUrl = $auth->logout(null, $paramters, $nameId, $sessionIndex, true);
     # $_SESSION['LogoutRequestID'] = $auth->getLastRequestID();
     # header('Pragma: no-cache');
     # 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 {
Пример #3
0
 /**
  * Call the getErrors method on OneLogin_Saml2_Auth.
  */
 public function getErrors()
 {
     return $this->instance->getErrors();
 }