You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
6.4 KiB

{
"name": "Codeigniter Aauth",
"tagline": "Authorization, authentication and User Management library for Codeigniter 2.x and 3.x to make easy user management and permission operations",
"body": "<p align=\"center\">\r\n<img src=\"https://cloud.githubusercontent.com/assets/2417212/8925689/add409ea-34be-11e5-8e50-845da8f5b1b0.png\" height=\"320\">\r\n</p>\r\n\r\n***\r\nAauth is a User Authorization Library for CodeIgniter 2.x and 3.x, which aims to make easy some essential jobs such as login, permissions and access operations. Despite its ease of use, it has also very advanced features like private messages, groupping, access management, and public access.\r\n\r\n**This is Quick Start page. You can also take a look at the [detailed Documentation Wiki](https://github.com/emreakay/CodeIgniter-Aauth/wiki/_pages) to learn about other great Features**\r\n\r\n### Features \r\n***\r\n* User Management and Operations (login, logout, register, verification via e-mail, forgotten password, user ban, login DDoS protection)\r\n* Group Operations (creating/deleting groups, membership management)\r\n* Admin and Public Group support (Public permissions)\r\n* Permission Management (creating/deleting permissions, allow/deny groups, public permissions, permission checking)\r\n* Group Permissions\r\n* User Permissions\r\n* User and System Variables\r\n* Login DDoS Protection\r\n* Private Messages (between users)\r\n* Error Messages and Validations\r\n* Langugage and config file support\r\n* Flexible implementation\r\n\r\n### What is new in Version 2\r\n***\r\n* User Permissions\r\n* User and System Variables\r\n* Login DDoS Protection\r\n* Updated functions (check documentation for details)\r\n* Bugs fixes\r\n* TOTP (Time-based One-time Password)\r\n\r\n### Migration\r\n***\r\n* If you are currently using Version 1, take a look at the [v1 to v2 migration page.](https://github.com/emreakay/CodeIgniter-Aauth/wiki/1%29-Migration-from-V1).\r\n\r\n### Quick Start \r\n***\r\nLet's get started :)\r\nFirst, we will load the Aauth Library into the system\r\n```php\r\n$this->load->library(\"Aauth\");\r\n```\r\n\r\nThat was easy!\r\n\r\nNow let's create two new users, `Frodo` and `Legolas`.\r\n\r\n```php\r\n$this->aauth->create_user('frodo@example.com','frodopass','Frodo Baggins');\r\n$this->aauth->create_user('legolas@example.com','legolaspass','Legolas');\r\n```\r\n \r\nWe now we have two users.\r\n\r\nOK, now we can create two groups, `hobbits` and `elves`.\r\n```php\r\n$this->aauth->create_group('hobbits');\r\n$this->aauth->create_group('elves');\r\n``` \r\n\r\nNow, let's create a user with power, Gandalf (for our example, let's assume he was given the `id` of 12).\r\n```php\r\n$this->aauth->create_user('gandalf@example.com', 'gandalfpass', 'Gandalf the Gray');\r\n``` \r\n\r\nOK, now we have two groups and three users.\r\n\r\nLet's create two permissions `walk_unseen` and `immortality` \r\n\r\n```php\r\n$this->aauth->create_perm('walk_unseen');\r\n$this->aauth->create_perm('immortality');\r\n``` \r\n\r\nOk, now let's give accesses to our groups. The Hobbits seem to have ability to walk unseen, so we will assign that privilage to them. The Elves have imortality, so we will assign that privilage to them.\r\nWe will assign access with `allow_group()` function.\r\n\r\n```php\r\n$this->aauth->allow_group('hobbits','walk_unseen');\r\n$this->aauth->allow_group('elves','immortality');\r\n \r\n \r\n$this->aauth->allow_group('hobbits','immortality');\r\n``` \r\n\r\nWait a minute! Hobbits should not have `immortality`. We need to fix this, we can use `deny()` to remove the permission.\r\n\r\n```php\r\n$this->aauth->deny('hobbits','immortality');\r\n``` \r\n\r\nGandalf can also live forever.\r\n\r\n```php\r\n$this->aauth->allow_user(12,'immortality');\r\n``` \r\n\r\nOk now let's check if Hobbits have `immortality`.\r\n\r\n```php\r\nif($this->aauth->is_group_allowed('hobbits','immortality')){\r\n\techo \"Hobbits are immortal\";\r\n} else {\r\n\techo \"Hobbits are NOT immortal\";\r\n}\r\n```\r\nResults:\r\n```\r\nHobbits are NOT immortal\r\n```\r\n\r\nDoes Gandalf have the ability to live forever?\r\n\r\n```php\r\nif($this->aauth->is_allowed(12,'immortality')){\r\n\techo \"Gandalf is immortal\";\r\n} else {\r\n\techo \"Gandalf is NOT
"google": "",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}