Skip to content

Commit 593db00

Browse files
committed
Fix up docs.
1 parent 585a62c commit 593db00

File tree

6 files changed

+578
-293
lines changed

6 files changed

+578
-293
lines changed

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,29 @@ echo $this->AuthUser->postLink('Delete', ['action' => 'delete', $id], ['confirm'
116116

117117
### Required Dependencies
118118

119-
TinyAuth acts as a wrapper around CakePHP's official [Authentication](https://github.com/cakephp/authentication) and [Authorization](https://github.com/cakephp/authorization) plugins.
120-
You need to install them first, depending on which part you want to use:
119+
**IMPORTANT:** TinyAuth is a wrapper plugin that extends CakePHP's official plugins. You must understand them first:
120+
121+
#### 📦 Official CakePHP Plugins
122+
123+
| Plugin | Purpose | Documentation |
124+
|--------|---------|---------------|
125+
| **[cakephp/authentication](https://github.com/cakephp/authentication)** | Handles user authentication (login, sessions, etc.) | [📖 Official Docs](https://book.cakephp.org/authentication/3/en/index.html) |
126+
| **[cakephp/authorization](https://github.com/cakephp/authorization)** | Handles user authorization (permissions, access control) | [📖 Official Docs](https://book.cakephp.org/authorization/2/en/index.html) |
121127

122128
```bash
123-
# Required for authentication features
129+
# Install for authentication features (login, sessions)
124130
composer require cakephp/authentication
125131

126-
# Required for authorization features
132+
# Install for authorization features (roles, ACL)
127133
composer require cakephp/authorization
128134
```
129135

130-
Then install TinyAuth:
136+
**Note:** You only need to install the plugin(s) for the features you plan to use.
137+
The AuthUser component and helper can work standalone without requiring the official plugins.
138+
139+
#### 📦 Install TinyAuth
140+
141+
After installing the required official plugin(s), install TinyAuth:
131142

132143
```bash
133144
composer require dereuromark/cakephp-tinyauth
@@ -139,8 +150,6 @@ Finally, load the plugin:
139150
bin/cake plugin load TinyAuth
140151
```
141152

142-
**Note:** The AuthUser component and helper can work standalone without requiring the official plugins. They work with any authentication solution that sets an identity in the request.
143-
144153
## Docs
145154
For setup and usage see [Docs](/docs).
146155

docs/Authentication.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,35 @@
11
# TinyAuth Authentication
22
The fast and easy way for user authentication in CakePHP applications.
33

4+
## Prerequisites
5+
46
**IMPORTANT:** This component wraps the official CakePHP Authentication plugin.
5-
You must install it first - see [AuthenticationPlugin.md](AuthenticationPlugin.md).
7+
You **must** install and understand it first:
8+
9+
### Required Steps
10+
11+
1. **Install the official plugin:**
12+
```bash
13+
composer require cakephp/authentication
14+
```
15+
16+
2. **Configure middleware and authentication service:**
17+
See [AuthenticationPlugin.md](AuthenticationPlugin.md) for complete TinyAuth-specific setup instructions.
18+
19+
Also refer to the [official CakePHP Authentication documentation](https://book.cakephp.org/authentication/3/en/index.html) for:
20+
- Middleware configuration
21+
- Authentication service setup
22+
- Identity configuration
23+
- Login/logout implementation
24+
25+
3. **Load TinyAuth component** (see [Enabling](#enabling) section below)
26+
27+
### What TinyAuth Authentication Adds
628

7-
Use TinyAuth Authentication Component if you want to add instant (and easy) INI-based action whitelisting to your application.
8-
You can allow/deny per controller action or with wildcards also per controller and more.
29+
Once the official plugin is configured, TinyAuth Authentication Component adds:
30+
- **INI-based action whitelisting** - Define public actions in `auth_allow.ini` instead of code
31+
- **Zero controller modifications** - No need to call `allowUnauthenticated()` in every controller
32+
- **Plugin compatibility** - Automatically works with third-party plugins
933

1034
## Basic Features
1135
- INI file (static) based access rights (controller-action setup)

0 commit comments

Comments
 (0)