[ class tree: core ] [ index: core ] [ all elements ]

Class: external_auth

Source Location: /external_auth.php

Class external_auth

Class Overview

Root class for external authorizaton plugins

Located in /external_auth.php [line 10]



		
				Author(s):
		
  • Stephen Billard (sbillard)
Information Tags:

Properties

Methods

[ Top ]
Property Summary
mixed   $auth  

[ Top ]
Method Summary
void   check()   This is the cookie processor filter handler it invokes the child class check() method to see if there is a valid visitor to the site The check() method should return "false" if there is no valid visitor or an array of User information if there is one.
void   user()   returns an array with the user details from the external authorization

[ Top ]
Properties
mixed   $auth = 'external' [line 12]

[ Top ]
Methods
check  [line 49]

  void check( BIT $authorized  )

This is the cookie processor filter handler it invokes the child class check() method to see if there is a valid visitor to the site The check() method should return "false" if there is no valid visitor or an array of User information if there is one.

If there is a valid user, the user name is checked against Zenphoto users. If such user exists he will be automatically logged in. If no user by that userid exists a transient user will be created and logged in. User details are filled in from the user information in the passed array.

Most enteries in the result array are simply stored into the user property of the same name. However, there are some special handling items that may be present:

  • groups: an array of the user's group membership
  • objects: a Zenphoto "managed object list" array
  • album: the name of the user's primary album
  • logout_link: information that the plugin can use when a user loggs out

All the above may be missing. However, if there is no groups entry, there needs to be an entry for the user's rights otherwise he will have none. There should not be both a rights entry and a groups entry as they are mutually exclusive.

album and objects entries should come last in the list so all other properties are processed first as these methods may modify other properties.

Parameters:
BIT   $authorized: 


[ Top ]
user  [line 17]

  void user( )

returns an array with the user details from the external authorization


API Tags:
Access:  protected


[ Top ]

Documentation generated on Sat, 07 Jun 2014 18:03:29 +0200 by phpDocumentor 1.4.3