Documentation


SEARCH

TABLE OF CONTENT

    1. Getting started 2. Basic concepts 3. Request dispatching 4. Context container 5. Dual MVC 6. Component model: 7. Security 8. Configuration 9. Session handling 10. I18n 11. Cache 12. Logging 13. Error handling 14. Advanced Topics 15. API reference

      Tutorials: Frequently Asqued Questions

      See also:


      Class: __AuthenticationManager


      Class Overview

      This file is part of lion framework.

      Copyright (c) 2010 Antonio Parraga Navarro

      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


      Author:  Antonio Parraga Navarro
      Version:  1.4
      Copyright:  Copyright (c) 2010 Antonio Parraga Navarro
      Link:  http://www.lionframework.org
      License:  http://www.lionframework.org/license.html
      __Singleton
         |
         --__AuthenticationManager

      Properties

      Methods

      [ Top ]

      Inherited Properties, Constants, and Methods

      Inherited Properties Inherited Methods Inherited Constants

      Inherited From __Singleton


      [ Top ]

      Properties Summary

      mixed   $_authenticators  
      __IUser   $_user   This variable stores the active user in session

      [ Top ]

      Method Summary

      __AuthenticationManager   __construct()  
      void   addAuthenticator()  
      __IUser   getAuthenticatedUser()   Gets the authenticated user, or the anonymous user if applicable
      __AuthenticationManager   &getInstance()   Returns the singleton instance of __AuthenticationManager class
      bool   isAnonymous()   Checks if the authenticated user is the anonymous one
      bool   isAuthenticated()   Checks if there is any authenticated user (included the anonymous user)
      void   logon()   This method perform the logon operation by checking the specified credentials for the specified user, changing the user and user_session according to the
      void   logonAsAnonymous()  
      void   logout()  
      void   setAuthenticatedUser()   Sets the authenticated user without run the authentication process.
      void   setAuthenticators()  

      [ Top ]

      Properties

      mixed   $_authenticators = array()
      Access:  protected


      __IUser   $_user = null
      This variable stores the active user in session

      Access:  protected


      Methods

      Constructor __construct


        __AuthenticationManager __construct( )

      Access:  public



      addAuthenticator


        void addAuthenticator( __IAuthenticator &$authenticator  )


      Parameters:
      TypeNameDescription
      __IAuthenticator &$authenticator

      Access:  public



      getAuthenticatedUser


        __IUser getAuthenticatedUser( )

      Gets the authenticated user, or the anonymous user if applicable

      Access:  public



      getInstance


        __AuthenticationManager &getInstance( )

      Returns the singleton instance of __AuthenticationManager class

      Return:  The singleton instance of __AuthenticationManager class
      Access:  public



      isAnonymous


        bool isAnonymous( )

      Checks if the authenticated user is the anonymous one

      Access:  public



      isAuthenticated


        bool isAuthenticated( )

      Checks if there is any authenticated user (included the anonymous user)

      Access:  public



      logon


        void logon( __IUserIdentity $user_identity, __ICredentials $credentials  )

      This method perform the logon operation by checking the specified credentials for the specified user, changing the user and user_session according to the


      Parameters:
      TypeNameDescription
      __IUserIdentity $user_identity
      __ICredentials $credentials

      Access:  public



      logonAsAnonymous


        void logonAsAnonymous( )

      Access:  public



      logout


        void logout( )

      Access:  public



      setAuthenticatedUser


        void setAuthenticatedUser( __IUser &$user, __IUser $user  )

      Sets the authenticated user without run the authentication process.

      The given user's roles will be also activated within the user session



      Parameters:
      TypeNameDescription
      __IUser &$user
      __IUser $user

      Access:  public



      setAuthenticators


        void setAuthenticators( &$authenticators  )


      Parameters:
      TypeNameDescription
      &$authenticators

      Access:  public