Download the PHP package clement/yii-rest-rbac without Composer

On this page you can find all versions of the php package clement/yii-rest-rbac. 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 yii-rest-rbac

Yii-rest-rbac 后台RBAC配置


写在前面

本篇只讲述如何使用Yii-rest-rbac进行 restful API认证和权限管理,关于原理,请移步 [Yii-REST-RBAC原理]()(目前未完成)

下载安装

创建数据表

  1. 使用@vendor\\clement\\yii-rest-rbac\\migrations下的 yii-rest-rbac.sql 导入到数据库中
  2. 你可以修改表前缀cc_或者在数据库配置中添加

配置文件

  1. app(backend/ common )的main.php中添加

  2. User中添加以下函数 (==注意函数中xxx参数需要自己修改==)

  3. LoginForm中添加

  4. 使用认证

    • 创建所有api控制器基类

    • UserController中修改behaviors()填加
  1. 使用权限
    • 使用 admin/route的url 即可到后台管理,原理请参照yii的官方文档的RBAC
    • 如果需要将在下个版本提供所有页面的rest版
    • 现在提供的接口

All versions of yii-rest-rbac with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ~2.0.7
clement/yii-rest-rbac Version ~2.0.0
lcobucci/jwt Version ~3.2.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 clement/yii-rest-rbac contains the following files

Loading the files please wait ....