Skip to content

Commit d49bbb6

Browse files
committed
Added docs index file and removed file numbers, and added TOC to each file.
1 parent 3e9963f commit d49bbb6

10 files changed

Lines changed: 103 additions & 0 deletions

File tree

docs/_index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Shield Documentation
2+
3+
* [Installation Guide](install.md)
4+
* [Concepts You Need To Know](concepts.md)
5+
* [Quick Start Guide](quickstart.md)
6+
* [Authentication](authentication.md)
7+
* [Authorization](authorization.md)
8+
* [Auth Actions](auth_actions.md)
9+
* [Events](events.md)
10+
* [Testing](testing.md)
11+
* [Customization](customization.md)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Authentication Actions
22

3+
- [Authentication Actions](#authentication-actions)
4+
- [Configuring Actions](#configuring-actions)
5+
- [Defining New Actions](#defining-new-actions)
6+
37
Authentication Actions are a way to group actions that can happen after login or registration.
48
Shield ships with two actions you can use, and makes it simple for you to define your own.
59

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Authentication
22

3+
- [Authentication](#authentication)
4+
- [Available Authenticators](#available-authenticators)
5+
- [Auth Helper](#auth-helper)
6+
- [Authenticator Responses](#authenticator-responses)
7+
- [isOK()](#isok)
8+
- [reason()](#reason)
9+
- [extraInfo()](#extrainfo)
10+
- [Session Authenticator](#session-authenticator)
11+
- [attempt()](#attempt)
12+
- [check()](#check)
13+
- [loggedIn()](#loggedin)
14+
- [logout()](#logout)
15+
- [forget()](#forget)
16+
- [Access Token Authenticator](#access-token-authenticator)
17+
- [Access Token/API Authentication](#access-tokenapi-authentication)
18+
- [Generating Access Tokens](#generating-access-tokens)
19+
- [Revoking Access Tokens](#revoking-access-tokens)
20+
- [Retrieving Access Tokens](#retrieving-access-tokens)
21+
- [Access Token Lifetime](#access-token-lifetime)
22+
- [Access Token Scopes](#access-token-scopes)
23+
324
Authentication is the process of determining that a visitor actually belongs to your website,
425
and identifying them. Shield provides a flexible and secure authentication system for your
526
web apps and APIs.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Authorization
22

3+
- [Authorization](#authorization)
4+
- [Defining Available Groups](#defining-available-groups)
5+
- [Default User Group](#default-user-group)
6+
- [Defining Available Permissions](#defining-available-permissions)
7+
- [Assigning Permissions to Groups](#assigning-permissions-to-groups)
8+
- [Authorizing Users](#authorizing-users)
9+
- [can()](#can)
10+
- [inGroup()](#ingroup)
11+
- [Managing User Permissions](#managing-user-permissions)
12+
- [addPermission()](#addpermission)
13+
- [removePermission()](#removepermission)
14+
- [syncPermissions()](#syncpermissions)
15+
- [Managing User Groups](#managing-user-groups)
16+
- [addGroup()](#addgroup)
17+
- [removeGroup()](#removegroup)
18+
- [syncGroups()](#syncgroups)
19+
320
Authorization happens once a user has been identified through authentication. It is the process of
421
determining what actions a user is allowed to do within your site.
522

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
This document covers some of the base concepts used throughout the library.
44

5+
- [Shield Concepts](#shield-concepts)
6+
- [Repository State](#repository-state)
7+
- [Settings](#settings)
8+
- [User Providers](#user-providers)
9+
- [User Identities](#user-identities)
10+
- [Password Validators](#password-validators)
11+
512
## Repository State
613

714
Shield is designed so that the initial setup of your application can all happen in code with nothing required to be
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Customizing Shield
22

3+
- [Customizing Shield](#customizing-shield)
4+
- [Route Configuration](#route-configuration)
5+
- [Custom Redirect URLs](#custom-redirect-urls)
6+
- [Extending the Controllers](#extending-the-controllers)
7+
38
## Route Configuration
49

510
If you need to customize how any of the auth features are handled, you will likely need to update the routes to point to the correct controllers. You can still use the `service('auth')->routes()` helper, but you will need to pass the `except` option with a list of routes to customize:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Shield fires off several events during the lifecycle of the application that your code can tap into.
44

5+
- [Events](#events)
6+
- [Responding to Events](#responding-to-events)
7+
- [Event List](#event-list)
8+
- [register](#register)
9+
- [login](#login)
10+
- [failedLogin](#failedlogin)
11+
- [logout](#logout)
12+
513
## Responding to Events
614

715
When you want to respond to an event that Shield publishes, you will need to add it to your `app/Config/Events.php`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Installation
22

3+
- [Installation](#installation)
4+
- [IMPORTANT: composer error](#important-composer-error)
5+
- [Note: migration error](#note-migration-error)
6+
- [Initial Setup](#initial-setup)
7+
- [Command Setup](#command-setup)
8+
- [Manual Setup](#manual-setup)
9+
- [Controller Filters](#controller-filters)
10+
- [Rate Limiting](#rate-limiting)
11+
312
These instructions assume that you have already [installed the CodeIgniter 4 app starter](https://codeigniter.com/user_guide/installation/installing_composer.html) as the basis for your new project, set up your `.env` file, and created a database that you can access via the Spark CLI script.
413

514
Installation is done through [Composer](https://getcomposer.org). The example assumes you have it installed globally.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ Learning any new authentication system can be difficult, especially as they get
44

55
NOTE: The examples assume that you have run the setup script and that you have copies of the `Auth` and `AuthGroups` config files in your application's `app/Config` folder.
66

7+
- [Quick Start Guide](#quick-start-guide)
8+
- [Authentication Flow](#authentication-flow)
9+
- [Customize login redirect](#customize-login-redirect)
10+
- [Customize register redirect](#customize-register-redirect)
11+
- [Customize logout redirect](#customize-logout-redirect)
12+
- [Customize Remember-me functionality](#customize-remember-me-functionality)
13+
- [Change Access Token Lifetime](#change-access-token-lifetime)
14+
- [Enable Two-Factor Authentication](#enable-two-factor-authentication)
15+
- [Enable Account Activation via Email](#enable-account-activation-via-email)
16+
- [Authorization Flow](#authorization-flow)
17+
- [Change Available Groups](#change-available-groups)
18+
- [Set the Default Group](#set-the-default-group)
19+
- [Change Available Permissions](#change-available-permissions)
20+
- [Assign Permissions to a Group](#assign-permissions-to-a-group)
21+
- [Assign Permissions to a User](#assign-permissions-to-a-user)
22+
- [Check If a User Has Permission](#check-if-a-user-has-permission)
23+
- [Managing Users](#managing-users)
24+
- [Creating Users](#creating-users)
25+
- [Deleting Users](#deleting-users)
26+
- [Editing A User](#editing-a-user)
27+
728
## Authentication Flow
829

930
If you need everyone to redirect to a single URL after login/logout/register actions, you can modify the `Config\Auth::redirects` array to specify the url to redirect to.
File renamed without changes.

0 commit comments

Comments
 (0)