Download the PHP package ums-lspl/sso-client without Composer

On this page you can find all versions of the php package ums-lspl/sso-client. 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-client

ums-lspl/sso-client

Laravel package for consumer apps that sign users in with SmartExam SSO.

SmartExam issues a signed token after the user approves login. This package verifies the token, creates or updates a local user, and starts a Laravel session.

Requirements: PHP 8.1+, Laravel 9–13, and an SSO application in SmartExam Admin → SSO → Applications.


Quick start

1. Install

This adds a nullable, unique smartexam_id column to users.

2. Configure .env

Register the same SSO_CALLBACK_URL in SmartExam Admin for your client key.

3. Update your User model

4. Add SSO to your login page

In your auth layout <head>:

In the layout body (no publish step needed):

On your login button:

That’s it. The partial loads the SmartExam overlay, stores CSRF state, opens the popup, and POSTs to the exchange route.


How it works

Recommended: popup + exchange (POST /api/sso/exchange) — handled by @include('smartexam-sso::login-script').

Alternative: full browser redirect to GET /sso/callback (no popup, no JavaScript).


Publish tags

Tag Use when
smartexam-sso-config You need to customize routes, provisioner, etc.
smartexam-sso-migrations First install — adds smartexam_id
smartexam-sso-views You want to edit the login script

Views are optional. To customize the login script:


Environment variables

Variable Required Description
SMARTEXAM_URL Yes SmartExam server URL (must match token iss)
SSO_CLIENT_KEY Yes Client key from SmartExam Admin
SSO_CLIENT_SECRET Yes Secret used to verify token signatures
SSO_CALLBACK_URL Yes Your callback URL (must match SmartExam registration)
SSO_AFTER_LOGIN_REDIRECT No Where to go after login. Default: /
SSO_AUDIENCE No Token aud claim. Default: origin of SSO_CALLBACK_URL
SMARTEXAM_SSO_ROUTES No Enable package routes. Default: true
SMARTEXAM_SSO_ROUTE_PREFIX No Prefix for SSO routes. Default: empty
SMARTEXAM_SSO_REQUIRE_STATE No Require session state. Default: true

Routes

Registered automatically (customize in config/smartexam-sso.php):

Method Path Name
GET /sso/callback smartexam-sso.callback
POST /api/sso/exchange smartexam-sso.exchange

Customization

Custom user provisioning

Default behavior: find or create user by email, set smartexam_id from token sub.

For custom logic, implement SmartExam\SsoClient\Contracts\SsoUserProvisioner:

Post-login hook

URL helpers


Troubleshooting

Error Fix
Unexpected token audience Set SSO_AUDIENCE to match your app URL
Unexpected token issuer SMARTEXAM_URL must match token issuer
Invalid / missing SSO state Use @include('smartexam-sso::login-script') or reload login page
CSRF token missing Add <meta name="csrf-token"> to layout
SSO client secret is not configured Set SSO_CLIENT_SECRET, run php artisan config:clear

Testing

License

MIT


All versions of sso-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.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 ums-lspl/sso-client contains the following files

Loading the files please wait ...