Download the PHP package kuainiu/yii2-kuainiu without Composer

On this page you can find all versions of the php package kuainiu/yii2-kuainiu. 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 yii2-kuainiu

yii2-kuainiu

Latest Stable Version Latest Unstable Version Total Downloads License

This extension adds kuainiu.io OAuth2 supporting for yii2-authclient.

安装

yii2-kuainiu 需要使用 composer 安装. 建议使用 composer 国内源 composer config repo.packagist composer https://packagist.phpcomposer.com

在项目根目录运行

或者手动添加到 composer.json

之后

配置

首先需要在 内部通行证系统 注册您的应用

然后修改需使用统一登录项目的配置文件(main.php 或 main-local.php)

authClient 的配置需要放在 common 项目的配置文件(main.php 或 main-local.php )

执行数据迁移:

以上脚本在 user 表增加了 avatar fullname position 三个字段用来存储头像、中文名和职位,字段名冲突或有错误的话,可以在 modules 中配置,例如:

使用

OAuth 登录

在登录页面增加 『使用企业通行证登录』 链接

如果全站只允许员工访问,不需要登录页面,直接修改 SiteController 的 actionLogin 方法:

用户完成登录之后,用户资料的使用无任何变化,在 view 文件中直接使用, 注意: 用户未登录界面调用会抛异常

API 获取组织架构信息

API 获取组织架构下的用户信息

API 发送企业微信消息

One more thing...

如果你的项目使用了 AdminLTE, 其使用的 GOOGLE 字体不可描述原因会导致页面打开慢,在 composer.json 增加以下内容可解决:


All versions of yii2-kuainiu with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2-authclient Version ~2.1.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 kuainiu/yii2-kuainiu contains the following files

Loading the files please wait ....