laravel-saml2 icon indicating copy to clipboard operation
laravel-saml2 copied to clipboard

No facade any more?

Open DanielMalmgren opened this issue 3 years ago • 1 comments

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 avatar Sep 09 '21 14:09 DanielMalmgren

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...

DanielMalmgren avatar Sep 09 '21 15:09 DanielMalmgren