Download the PHP package chromefan/df-laravel-sso without Composer

On this page you can find all versions of the php package chromefan/df-laravel-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 df-laravel-sso

df-laravel-sso

这是一个基于oauth2.0协议在laravel框架下的SSO登录客户端组件

安装

composer require chromefan/df-laravel-sso

DfSSO\SSO\SSOServiceProvider::class,

'SSO'=>DfSSO\SSO\Facades\SSO::class,

$middleware[ \Illuminate\Session\Middleware\StartSession::class,

]

$routeMiddleware[ permission' => \DfSSO\SSO\Middleware\Permission::class, ]

php artisan vendor:publish

配置

Open config/sso.php ,需要在 鼎复用户中心 中注册app,获取client_id, 和client_secret。

打开routes/web.php 将需要加入控制的路由放入permission组

Route::group(['middleware' => 'permission'],function (){}

权限控制

1、首先在鼎复用户中心 中注册app,并创建角色、权限,并给用户赋予角色;

2、权限值pvalue必须与要控制的路由route名一一对应'

3、如果需要管理员权限,请设置权限值为'admin'或者将该用户设为leader或者用户中心管理员'

使用示例

1、检测登录

$user = SSO::isLogin()

2、获取用户信息

$user = SSO::getUser()

3、注销退出

SSO::logout()


All versions of df-laravel-sso with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*
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 chromefan/df-laravel-sso contains the following files

Loading the files please wait ....