Gallery3:Developer Handbook:Authentication - Gallery Codex
Personal tools

Gallery3:Developer Handbook:Authentication

From Gallery Codex

Authentication

By default, Gallery 3 has its own standalone authentication system. The user module stores information about each user in the database and can authenticate users by username and password. There are three types of users

However, Gallery 3 also comes with a pluggable authentication system that supports the concept of identity providers. An identity provider is an authentication system that can provide the following basic functions:

User functions

  • Provide a guest user
  • Provide an admin user
  • Create a new user
  • Lookup a user by id
  • Get a list of users based on ids provided
  • Verify a username / password combination

Group functions

  • Create a new group
  • Provide an everybody group
  • Provide a registered users group
  • Lookup a group by id
  • Lookup a group by name
  • List all available groups
  • Add a user to a group
  • Remove a user from a group

The user module provides this functionality in modules/user/libraries/drivers/IdentityProvider/Gallery.php and uses ORM to interact with User_Model and Group_Model for the data it needs.