Download the PHP package ghost-cat/azoya-sso without Composer

On this page you can find all versions of the php package ghost-cat/azoya-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 azoya-sso

Requirement

  1. PHP >= 5.6
  2. yii >= 2.0
  3. Composer

Installation

Config

配置文件 params.php 中添加 sso 参数,各个配置项找 azoya sso 管理员申请

确保项目中通过 Yii::$app->params['sso_host']Yii::$app->params['sso_app_alias'] ... 可以访问到配置的值

Usage

基本使用:

判断是否有 sso_token,返回 bool 类型

获取同步 sso_token 地址

获取登录地址

获取 sso 后台主页地址(logo链接地址)

判断当前路由是否有权限,返回 bool 类型;参数 route 为当前地址去除host和参数部分,比如地址是 http://www.azoya-sso.com/role/edit?id=16,则该地址的route/role/edit

获取菜单数据,返回数据为 array 类型

判断当前菜单是否有权限,返回 bool 类型;当菜单是一级菜单时,menuRoute 为一级菜单的 alias 字段的值;当菜单为非一级时,menuRoute 为一级菜单的 alias 字段与当前菜单的 url 拼接(用冒号 : 拼接),比如 promotion:/promotion/lucky-draw/index

判断站点是否有权限,返回 bool 类型;$siteId 就是各个站点的 website id

获取授权站点数据,返回数据为 array 类型

返回数据转为 json 如下:

批量查询用户数据, userIds 类型为数组;用于列表显示操作人姓名

返回数据转为 json 如下:

根据用户姓名查找用户(精确查询),为空时返回 null

返回数据转为 json 如下:

退出登录

获取语言

设置语言,language 的值目前只支持 zh-CNen-US

Yii Example

自定义过滤器 SSOFilter

BaseController 引用 SSOFilter 过滤器,其他所有控制器继承 BaseController 开发

添加 SsoController.php,确保 /sso/sync/sso/logout 可以访问到

按钮可以通过 SSOClient::hasAccess() 判断是否有权限,并决定是否展示

License

MIT


All versions of azoya-sso with dependencies

PHP Build Version
Package Version
Requires php Version >=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 ghost-cat/azoya-sso contains the following files

Loading the files please wait ....