src/Aacotroneo/Saml2/Http/Controllers/Saml2Controller.php
public function acs()
    {
        $errors = $this->saml2Auth->acs();

        if (!empty($errors)) {
            logger()->error('Saml2 error_detail', ['error' => $this->saml2Auth->getLastErrorReason()]);
            session()->flash('saml2_error_detail', [$this->saml2Auth->getLastErrorReason()]);

            logger()->error('Saml2 error', $errors);
            session()->flash('saml2_error', $errors);
            return redirect(config('saml2_settings.errorRoute'));
        }
        $user = $this->saml2Auth->getSaml2User();

        event(new Saml2LoginEvent($user, $this->saml2Auth));

        $redirectUrl = $user->getIntendedUrl();

        if ($redirectUrl !== null) {
            return redirect($redirectUrl);
        } else {

            return redirect(config('saml2_settings.loginRoute'));
        }
    }
public function acs()
    {
        $errors = $this->saml2Auth->acs();

        if (!empty($errors)) {
            logger()->error('Saml2 error_detail', ['error' => $this->saml2Auth->getLastErrorReason()]);
            session()->flash('saml2_error_detail', [$this->saml2Auth->getLastErrorReason()]);

            logger()->error('Saml2 error', $errors);
            session()->flash('saml2_error', $errors);
            return redirect(config('saml2_settings.errorRoute'));
        }
        $user = $this->saml2Auth->getSaml2User();

        event(new Saml2LoginEvent($user, $this->saml2Auth));

        $redirectUrl = $user->getIntendedUrl();

        if ($redirectUrl !== null) {
            return redirect($redirectUrl);
        } else {

            return redirect(config('saml2_settings.loginRoute'));
        }
    }
public function acs ( ) { $ errors = $ this -> saml2Auth -> acs ( ) ; if ( ! empty ( $ errors ) ) { logger ( ) -> error ( 'Saml2 error_detail' , [ 'error' => $ this -> saml2Auth -> getLastErrorReason ( ) ] ) ; session ( ) -> flash ( 'saml2_error_detail' , [ $ this -> saml2Auth -> getLastErrorReason ( ) ] ) ; logger ( ) -> error ( 'Saml2 error' , $ errors ) ; session ( ) -> flash ( 'saml2_error' , $ errors ) ; return redirect ( config ( 'saml2_settings.errorRoute' ) ) ; } $ user = $ this -> saml2Auth -> getSaml2User ( ) ; event ( new Saml2LoginEvent ( $ user , $ this -> saml2Auth ) ) ; $ redirectUrl = $ user -> getIntendedUrl ( ) ; if ( $ redirectUrl !== null ) { return redirect ( $ redirectUrl ) ; } else { return redirect ( config ( 'saml2_settings.loginRoute' ) ) ; } }
Process an incoming saml2 assertion request.
Fires 'Saml2LoginEvent' event if a valid user is Found
Process an incoming saml2 assertion request . Fires Saml2LoginEvent event if a valid user is Found