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

Class: AuthorizationEngine

Source Location: /lib/authz/AuthorizationEngine.php

Class Overview

GenericEngine
   |
   --AuthorizationEngine



Author(s):

Version:

  • 2.0

Copyright:

  • Copyright 2005-2010 RedIRIS, http://www.rediris.es/

    This file is part of phpPoA2.

    phpPoA2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

    phpPoA2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with phpPoA2. If not, see <http://www.gnu.org/licenses/>.

Variables

Methods


Child classes:

AttributeFilterAuthzEngine
Authorization engine that works by checking the attributes of the user. The first match of an attribute against one of the filters will trigger the authorization result, no matter if it's positive or negative.
InviteAuthzEngine
Invitation based authorization engine.
QueryFilterAuthzEngine
Authorization engine that works by checking the query string of the request.
SourceIPAddrAuthzEngine
Authorization engine that works by checking the source IP address of the request.

Inherited Variables

Inherited Methods

Class: GenericEngine

GenericEngine::__construct()
Main constructor for the engine.
GenericEngine::addHook()
Adds a function to the specified hook, which will be executed at some point of the code.
GenericEngine::clean()
Unregister error and exception handlers. Use it only for methods not declared in the interface that previously called registerHandler() method.
GenericEngine::configure()
Configure the engine.
GenericEngine::registerHandler()
Register error and exception handlers for logging. Use it only for methods not declared in the interface that could trigger errors.
GenericEngine::removeHook()
Removes a function fromt he specified hook.
GenericEngine::runHooks()
Run all hooks attached to an specific action.
GenericEngine::setHandler()
Set the event handler to the one specified.

Class Details

[line 26]


Tags:

author:  Jaime Perez <jaime.perez@rediris.es>
version:  2.0
copyright:  

Copyright 2005-2010 RedIRIS, http://www.rediris.es/

This file is part of phpPoA2.

phpPoA2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

phpPoA2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with phpPoA2. If not, see <http://www.gnu.org/licenses/>.

abstract:  
license:  GNU General Public License


[ Top ]


Class Variables

$engine_type =  "Authz"

[line 28]



Tags:

access:  protected

Type:   mixed
Overrides:   Array


[ Top ]



Class Methods


method authorize [line 47]

boolean authorize( $user, $attrs, $ref, [ $expires = 0])



Tags:

abstract:  
access:  public


Overridden in child classes as:

AttributeFilterAuthzEngine::authorize()
InviteAuthzEngine::authorize()
Authorize the specified user.
QueryFilterAuthzEngine::authorize()
SourceIPAddrAuthzEngine::authorize()

Parameters:

   $user  
   $attrs  
   $ref  
   $expires  

[ Top ]

method getAuthorizedList [line 42]

array getAuthorizedList( )



Tags:

abstract:  
access:  public


Overridden in child classes as:

AttributeFilterAuthzEngine::getAuthorizedList()
InviteAuthzEngine::getAuthorizedList()
Get a list of all authorized users.
QueryFilterAuthzEngine::getAuthorizedList()
SourceIPAddrAuthzEngine::getAuthorizedList()

[ Top ]

method isAuthorized [line 37]

boolean isAuthorized( user $user, attrs $attrs)

Check authorization for the specified user.



Tags:

return:  AUTHZ_SUCCESS if the user is authorized, AUTHZ_FAILED in any other case.
abstract:  
access:  public


Overridden in child classes as:

AttributeFilterAuthzEngine::isAuthorized()
InviteAuthzEngine::isAuthorized()
Check if the specified user is authorized with the given attributes.
QueryFilterAuthzEngine::isAuthorized()
PLEASE NOTE THAT THIS ENGINE SILENTLY IGNORES BOTH USER AND ATTRIBUTES.
SourceIPAddrAuthzEngine::isAuthorized()
PLEASE NOTE THAT THIS ENGINE SILENTLY IGNORES BOTH USER AND ATTRIBUTES.

Parameters:

user   $user   The string that identifies the user.
attrs   $attrs   All attributes related to the user.

[ Top ]

method revoke [line 52]

boolean revoke( $mail)



Tags:

abstract:  
access:  public


Overridden in child classes as:

AttributeFilterAuthzEngine::revoke()
InviteAuthzEngine::revoke()
Revoke authorization for the specified user.
QueryFilterAuthzEngine::revoke()
SourceIPAddrAuthzEngine::revoke()

Parameters:

   $mail  

[ Top ]


Documentation generated on Mon, 20 Feb 2012 12:06:59 +0100 by phpDocumentor 1.4.3