PHPackages                             zhoufanqq/sso-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. zhoufanqq/sso-client

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

zhoufanqq/sso-client
====================

单点登录客户端（laravel版）

0.0.1(9y ago)5462[1 issues](https://github.com/zhoufanqq/ssoClient/issues)MITPHPPHP ~5.5|~7.0

Since Jun 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/zhoufanqq/ssoClient)[ Packagist](https://packagist.org/packages/zhoufanqq/sso-client)[ Docs](https://github.com/zhoufanqq/ssoClient)[ RSS](/packages/zhoufanqq-sso-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

[![Laravel](https://camo.githubusercontent.com/065090645005d594cc1e8a431a709b9b8e2d4ff91785babfd57aaee3b5b06aef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d7e352e302d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](http://laravel.com)

适用于 Laravel 5 的 sso单点登录客户端。

Getting Started
---------------

[](#getting-started)

### 安装

[](#安装)

```
Via Composer

``` bash
$ composer require zhoufanqq/sso-client
```

```

### 添加 Provider 到 `config/app.php` 配置项中。

[](#添加-provider-到-configappphp-配置项中)

```
'providers' => [

  /*
   * Application Service Providers...
   */
     App\Providers\AppServiceProvider::class,
     App\Providers\AuthServiceProvider::class,
     App\Providers\EventServiceProvider::class,
     App\Providers\RouteServiceProvider::class,
  // ...

  // 添加 FIS 的 Provider
  zhoufanqq\ssoClient\ssoClientServiceProvider::class,

],
```

### 如果你想更直接的使用 FIS Facades 的话，请添加 aliases。同样是 `config/app.php` 配置项中。

[](#如果你想更直接的使用-fis-facades-的话请添加-aliases同样是-configappphp-配置项中)

```
'aliases' => [

  'View' => Illuminate\Support\Facades\View::class,
  'Curl' => Ixudra\Curl\Facades\Curl::class,

  // ...

  'ssoClient' => zhoufanqq\ssoClient\Facades\ssoClient::class,
],
```

### **重要事项**

[](#重要事项)

\*暂时使用redis保存信息，使用名为Redisp \*默认sso异步通知URI为： `/sso-client/check`

### 使用

[](#使用)

-添加拦截中间件

```
 ``` php
 use ssoClient;

    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if (!ssoClient::isLogin()) {
            return redirect('login-path');
        }
        return $next($request);
    }
 ```

```

### 函数

[](#函数)

#### isLogin()

[](#islogin)

判断用户是否登录，返回true or false

#### check(Request $request)

[](#checkrequest-request)

sso中心授权成功后，sso客户端根据返回的ticket判断用户是否登录。返回true or false

#### getUserInfo()

[](#getuserinfo)

返回用户信息

Change Log
----------

[](#change-log)

### 2015/07/13 发布 1.0 版本

[](#20150713-发布-10-版本)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3607d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/368c0b232d97470739752350defc440a63ac765a0651bfd8ba55e49297cec184?d=identicon)[zhoufanqq](/maintainers/zhoufanqq)

---

Tags

zhoufanqqssoClient

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/zhoufanqq-sso-client/health.svg)

```
[![Health](https://phpackages.com/badges/zhoufanqq-sso-client/health.svg)](https://phpackages.com/packages/zhoufanqq-sso-client)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[stechstudio/laravel-jwt

Helper package that makes it easy to generate, consume, and protect routes with JWT tokens in Laravel

126117.6k](/packages/stechstudio-laravel-jwt)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
