subfission / cas

Simple CAS Authentication for Laravel 5 - 10.
MIT License
151 stars 70 forks source link

ValueError in server calling to cas()->isAuthenticated() #97

Closed darece closed 3 years ago

darece commented 3 years ago

I don't undersand what's happening, I get this error page every time:

My middleware that produces this error is:

public function handle(Request $request, Closure $next)
    {
        dd(cas()->isAuthenticated()); # This line produces the crash

Notice that the url for security reasons has been hidden. The web.php route is:

Route::get('/test', function() {
    phpinfo();
})->middleware('phpCasAuth');

Notice too that even I force the url without ticket QS variable, is always redirected to this ticket QS url variable:

imagen

darece commented 3 years ago

Solved! the problem was a simple missmatch configuration in cas.php config file, the CAS_ENABLED_SAML must be set to empty string due our phpCAS server validator doesn't uses this feature, so was a fail of mine! imagen

Thanks!