Which library to use in Laravel and SAML POST binding

1.1k Views Asked by At

There is need to send from my SP to IdP SAML AthnRequest over HTTP-POST and HTTP-Redirect is not allowed.

Good package is aacotroneo/laravel-saml2 but it does not support HTTP-POST.

simplesamlphp/simplesamlphp is popular but it is a mess to use.

What library to use for proper SAML integration in Laravel that supports HTTP-POST requests to IdP?

2

There are 2 best solutions below

0
On BEST ANSWER

https://packalyst.com/packages/package/aherstein/laravel-saml2-post is the library that has been forked from aacotroneo/laravel-saml2 and modified to send POST requests.

0
On

With some effort you should be able to modify https://github.com/aacotroneo/laravel-saml2 to send AuthNRequest using HTTP-POST.

Instead use directly the login method of php-saml that you can find here https://github.com/onelogin/php-saml/blob/master/lib/Saml2/Auth.php#L428

you can execute the code described there and do a POST instead of a GET, if you need to support signature, you will need to embed it.

The alternatives is https://github.com/KnightSwarm/laravel-saml