Aacotroneo\Saml2\Http\Controllers\Saml2Controller::acs PHP Method

acs() public method

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