官术网_书友最值得收藏!

Chapter 1. Authentication

This chapter will cover the following topics:

  • Setting up a basic authentication system
  • Using and configuring the Auth component
  • Allowing logins with e-mail or username
  • Saving the user details after login
  • Getting the current user's information
  • Using prefixes for role-based access control
  • Setting up Access Control Layer based authentication
  • Integrating with OpenID

Introduction

This chapter explains how to set up authentication on a CakePHP application, starting from the most basic setup and finishing with advanced authorization mechanisms. This is accomplished through the use of tools that are built into the framework core, which allow us to quickly set up secure areas without losing flexibility to build more complex solutions.

The first two recipes show us how to set up a basic, yet fully working authentication system. The next three recipes allow our users to log in using different information, have their user details saved after a successful login, and show us how to get this user information. The sixth recipe shows a more complex authorization technique that relies on route prefixes. The seventh recipe sets up a complex authentication system through the use of CakePHP's Access Control Layer. Finally, the last recipe shows us how to integrate our application with OpenID.

主站蜘蛛池模板: 山阳县| 巫山县| 甘德县| 钟山县| 克山县| 将乐县| 嘉禾县| 盈江县| 双流县| 南乐县| 大余县| 奉贤区| 杭锦旗| 虹口区| 长岭县| 根河市| 正定县| 阳新县| 余江县| 大竹县| 中方县| 安福县| 镇宁| 筠连县| 江阴市| 岐山县| 安吉县| 巴林右旗| 纳雍县| 常宁市| 扶风县| 友谊县| 安远县| 泰兴市| 贺州市| 保德县| 上饶县| 洛阳市| 会理县| 紫阳县| 景东|