Download the PHP package lanlin/god without Composer

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

God Permission System

"God said, Let there be light, and there was light."

"God will decide if you have permission."

"God bless you!"

Install

The Origin

God is written after referring to the Casbin(golang) project, thanks for their hard work.

For more detail, please refer to the documentation of Casbin.

Supported models

  1. ACL (Access Control List)
  2. ACL with superuser
  3. ACL without users: especially useful for systems that don't have authentication or user log-ins.
  4. ACL without resources: some scenarios may target for a type of resources instead of an individual resource by using permissions like write-article, read-log. It doesn't control the access to a specific article or log.
  5. RBAC (Role-Based Access Control)
  6. RBAC with resource roles: both users and resources can have roles (or groups) at the same time.
  7. RBAC with domains/tenants: users can have different role sets for different domains/tenants.
  8. ABAC (Attribute-Based Access Control): syntax sugar like resource.Owner can be used to get the attribute for a resource.
  9. RESTful: supports paths like /res/*, /res/:id and HTTP methods like GET, POST, PUT, DELETE.
  10. Deny-override: both allow and deny authorizations are supported, deny overrides the allow.
  11. Priority: the policy rules can be prioritized like firewall rules.

Supported Adapters

  1. file adapter
  2. MongoDB adapter
  3. PHP PDO adapters (now support: MySQL, PostgreSQL, SQLite, SqlServer.)

How it works?

does "Who" as "Role" or "Group" from "Where" do "Operator" to "What" will got "How"?

Identifier Description
r Request (r = sub, obj, act)
p Policy (p = sub, obj, act, eft)
g Group or Role (g = , )
e Policy Efftect (e = some(where (p.eft == allow)))
m Matchers (m = r.obj == p.obj)
sub Subject (Who)
dom Domain (Where)
obj Object (What)
act Action (Operator)
eft Efftect (How) (allow, deny, indeterminate)

An access control model is abstracted into a CONF file based on the PERM metamodel (Policy, Effect, Request, Matchers).

So switching or upgrading the authorization mechanism for a project is just as simple as modifying a configuration.

You can customize your own access control model by combining the available models.

For example, you can get RBAC roles and ABAC attributes together inside one model and share one set of policy rules.

The most basic and simplest model in God is ACL. ACL's model CONF is:

An example policy for ACL model is like:

It means:

Demo

For more usage demos, please view the unit tests or

Casbin 中文文档

Casbin Documents

License

This project is licensed under the MIT license.


All versions of god with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
monolog/monolog Version ^1.23
symfony/expression-language Version ^4.3
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 lanlin/god contains the following files

Loading the files please wait ....