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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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

  1. Upgrade the package: composer require agriserv/sso:^2.0. No changes to your published LoginSsoController are needed.
  2. The SSO server must be running its matching v2 release.
  3. 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_URI must point at the package's auth/callback route, 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_URL must point at the SSO portal's auth/logout route. 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.

7. Add Middleware for the protected routes


All versions of sso with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package agriserv/sso contains the following files

Loading the files please wait ...