ZF Authentication

From Triangle Wiki

Jump to: navigation, search

Contents

Authentication

Authentication basically covers the following requirements:

  • An authentication adapter
  • A login form
  • A controller for login/logout actions
  • Checking for an authenticated user in subsequent requests

We will be utilising the following Zend Packages:

Authentication Adapter

We use an adaptor Authentication Adapters to authenticate the user against our desired storage. Triangle will always use either the:

Login Form

Triangle uses the Helpers_LoginForm class to produce a form where a user can enter an Email and Password combination.

Login Controller

Triangle has provided a Module - Users, to handle all actions based around user activity, this included login, lost details and updating details.

A typical user flow for logging into a site is:

  • User hits login form
  • User enters credentials and submits form
  • Controller processes form
    • Validation errors redisplay the form with error messages
    • Successful validation redirects to home page
  • Logged-in user gets redirected to home page
  • Logout action logs out user and redirects to login form

The LoginController makes use of the chosen authentication adapter, as well as the login form. When we have valid credentials, we'll pass them to our authentication adapter.

External Links

Navigation

Edit Navigation

Personal tools