yeltrik / soap-auth
Authentication through SOAP
0.3.6
2022-04-27 22:07 UTC
Requires
- laravel/ui: ^3
This package is auto-updated.
Last update: 2025-04-28 04:51:13 UTC
README
SOAPAuth is a Library to Authorize an Username and Password with a custom SOAP Auth WSDL
Install
Install the SOAP Auth package
composer require yeltrik/soap-auth
Configuration
After install, there are just a few modifications that can be made to integrate with your Laravel App.
.env
To configure the WSDL for you App, you should set the WSDL URL and Key in the .env file
SOAP_AUTH_WSDL_URL = 'https://apps.wdsl.com/services/authlogin/auth.wsdl' SOAP_AUTH_WSDL_KEY = 'abc123def456789' SOAP_AUTH_LOGO_URL = 'https://www.wdsl.com/marketingandcommunications/images/logo.jpg' SOAP_AUTH_USERNAME_LABEL = 'Username' SOAP_AUTH_USERNAME_PLACEHOLDER = 'username'
routes/web.php
If you do not with to allow users to self register, then you can disable registration through laravel/ui by disabling the Auth::route();
Auth::routes([ 'register' => false, ]);
You can override the login by first disabling Auth, then naming the route for SOAP;
Auth::routes(['register' => false, 'login' => false]); Route::get('login', [SOAPAuthController::class, 'showForm'])->name('login');
Integrating into a blade by directing to the authrorize route
route('authorize')