Download the PHP package tuahweb/php-sso-client-connect without Composer

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

tuahweb/php-sso-client-connect — SSO Client Connect for Laravel

A reusable Laravel package that connects client applications to a Laravel Passport-based SSO Identity Provider (like sso-server). Handles OAuth2 authentication, webhook-driven user sync, role/permission middleware, and automatic user provisioning.

Features

Requirements

Installation

Publish Configuration

Configuration

1. Environment Variables (.env)

Setel SSO_PROVIDER sebagai base URL SSO server. Semua endpoint OAuth2 akan diturunkan secara otomatis.

Gunakan variabel berikut jika ingin override endpoint individual (opsional):

2. Service Configuration (config/services.php)

redirect, authorize_url, token_url, user_info_url, dan server_url diturunkan dari SSO_PROVIDER secara otomatis — cukup setel di .env.

Contoh minimal:

3. User Model

Your User model (or any class specified in config('sso.user_model')) should have these columns/methods:

Migration columns:

Methods expected by the package (optional, for Gate-based auth):

4. Middleware Registration (bootstrap/app.php for Laravel 11+)

5. Optional: Gate Registration

In App\Providers\AuthServiceProvider:

Usage

Routes (Auto-Registered)

The package automatically registers these routes:

Method URI Name Description
GET /auth/sso/redirect auth.sso.redirect Redirect to SSO login
GET /auth/sso/callback auth.sso.callback Handle SSO callback
POST /webhook/sso-sync webhook.sso-sync Webhook receiver

You can disable auto-routing in config/sso.php:

Console Commands

Logout Behavior

When a user logs out from a client application:

  1. Local session only — The client app clears its local session (Auth::logout())
  2. SSO session preserved — The user remains authenticated on the SSO server
  3. Redirect to SSO dashboard — User is redirected to the SSO server dashboard after logout
  4. Access other apps — User can immediately access other client apps without re-authenticating

Example flow:

Configuration:

To implement full SSO logout (log out from SSO server and all clients), you would need to implement a separate logout endpoint on the SSO server that revokes tokens and triggers logout webhooks to all clients.

Customization

Override the User Model

Override the Webhook Job

Create your own job class that extends the default:

Then update config:

Override Controllers

Extend any package controller and override methods:

Then update config:

Development

For local development, add a path repository in your consuming project's composer.json:


All versions of php-sso-client-connect with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/socialite Version ^5.28
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^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 tuahweb/php-sso-client-connect contains the following files

Loading the files please wait ...