Documentation
Book
API
Videos
Reporting Security Issues
Privacy Policy
Logos & Trademarks
Business Solutions
Swag
Road Trip
Team
Community
Community
Get Involved
Issues (Github)
Bakery
Featured Resources
Training
Meetups
My CakePHP
CakeFest
Newsletter
Linkedin
YouTube
Facebook
Twitter
Mastodon
Help & Support
Forum
Stack Overflow
Slack
Paid Support
B
CakePHP Authentication 3.x
Cookbook
A
Language:
en
es
fr
ja
Version:
3.x
1.x
2.x
3.x
Nav
Table of Contents
×
Improve This Doc
Contents
¶
CakePHP Authentication
Quick Start
Getting Started
Building a Login Action
Adding Password Hashing
Further Reading
Authenticators
Session
Form
Token
JWT
HttpBasic
HttpDigest
Cookie Authenticator aka “Remember Me”
Environment Variables
Events
URL Checkers
Getting the Successful Authenticator or Identifier
Using Stateless Authenticators with Stateful Authenticators
Handling Unauthenticated Errors
Having Multiple Authentication Flows
Identifiers
Password
Token
JWT Subject
LDAP
Callback
Identity resolvers
Password Hashers
Default
Legacy
Fallback
Upgrading Hashing Algorithms
Identity Objects
Creating your own Identity Object
Implementing the IdentityInterface on your User class
Using a Custom Identity Decorator
Middleware
Configuration
Configuring Multiple Authentication Setups
Authentication Component
Accessing the logged in user
Checking the login status
Logging out the identity
Configure Automatic Identity Checks
Testing with Authentication
Session based authentication
Token based authentication
Basic/Digest based authentication
User Impersonation
Enabling Impersonation
Ending Impersonation
Limitations to Impersonation
URL Checkers
Included Checkers
View Helper
Migration from the AuthComponent
Differences
Similarities
Identifiers and authenticators
Migrating your authentication setup
Migrating Unauthenticated Redirects
Migrating Hashing Upgrade Logic
Upgrading from 2.x to 3.x
Breaking changes
Quick Start
→