aacotroneo / laravel-saml2

A Laravel 5 package for Saml2 integration as a SP (service provider) based on the simple OneLogin toolkit
MIT License
564 stars 237 forks source link

No facade any more? #250

Open DanielMalmgren opened 2 years ago

DanielMalmgren commented 2 years ago

Hi. I have a working SAML setup with an old version of laravel-saml2 on one site and now I'm trying to do a similar setup on another site, but things seem to have changed and I don't understand how to proceed.

Just following the readme and simply trying to instantiate a new Saml2Auth doesn't work, I just get a "Class 'App\Exceptions\Saml2Auth' not found" (and I don't really understand how I could get anything else). Copying over code from my old working setup, using "Aacotroneo\Saml2\Facades\Saml2Auth" instead doesn't work either, the facade doesn't even seem to exist in recent versions. I've literally been reading the readme and Googling for hours, nothing is helping. Anyone can see what I'm doing wrong???

DanielMalmgren commented 2 years ago

Ha! After half a day of struggling, I found the solution (by reading into the source code), just adding a "use Aacotroneo\Saml2\Saml2Auth;" to the top made everything work. Guess this could be mentioned somewhere in the readme...