Download the PHP package agriserv/sso without Composer
On this page you can find all versions of the php package agriserv/sso. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sso
AgriServ SSO
Easily integrate your application with AgriServ SSO.
v2.0
v2.0 strengthens the login flow: the callback authenticates to the SSO server
when exchanging the one-time login token, and the handshake carries a
single-use state value that is verified when the user returns to
auth/callback.
Upgrading from v1.x
- Upgrade the package:
composer require agriserv/sso:^2.0. No changes to your publishedLoginSsoControllerare needed. - The SSO server must be running its matching v2 release.
- After verifying login works, ask the SSO Administrator to enable Require Authenticated Exchange for your application.
Logins started from the SSO portal's app tiles are transparently restarted as app-initiated logins (one extra redirect). This is expected.
Installation Steps
1. Install the Package
Add the package to your Laravel application via Composer:
2. Publish the Configuration and Controller
This will create a config/sso.php file in your application.
This will publish a controller to your application at: app/Http/Controllers/LoginSsoController.php.
3. Set Up an Application in AgriServ SSO
Ask the AgriServ SSO Administrator to generate an application for you. Provide them with the following details:
CALL_BACK_URI: Your application's callback URL — this is always https://your-app.example.com/auth/callback (the auth/callback route registered by this package).
4. Configure the .env File
Add the following variables to your .env file:
Important:
SSO_REDIRECT_URImust point at the package'sauth/callbackroute, not your application root. If it points anywhere else the one-time login token is never exchanged and the user bounces between your app and the SSO portal.Important:
SSO_LOGOUT_URLmust point at the SSO portal'sauth/logoutroute. Without it, logging out only ends your app's local session — the portal session survives and silently signs the user back in on the next protected page, making logout appear broken.
5. Override the handleUserInfo Method
Once the LoginSsoController is published, you can override the handleUserInfo method to handle the logic for processing user data from SSO.
Example: Handling User Info Open the file, and modify the method as needed:
6. Test Your Integration
Test your SSO integration by navigating to the SSO login route (e.g., ). Ensure users are logged in and synchronized correctly with your application.