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

Class: PAPIAuthnEngine

Source Location: /lib/authn/PAPIAuthnEngine.php

Class Overview

GenericEngine
   |
   --AuthenticationEngine
      |
      --PAPIAuthnEngine

Authentication engine for the PAPI 1.5 protocol.


Variables

Methods


Inherited Variables

Inherited Methods

Class: AuthenticationEngine

AuthenticationEngine::authenticate()
Trigger the authentication of the user in the current context. May perform HTTP redirections or any other procedure to gather the authentication status if the user, so don't expect it to return control once called.
AuthenticationEngine::getAttribute()
Get an specific attribute for the current user, by specifying its name and namespace. May trigger some attribute query procedure.
AuthenticationEngine::getAttributes()
Get an associative array with the set of common attributes for the current user. May trigger some attribute recollection.
AuthenticationEngine::isAuthenticated()
Check the current authentication status withing this context. Does not trigger any authentication procedure.
AuthenticationEngine::logout()
Perform a logout (locally or global).

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 118]
Authentication engine for the PAPI 1.5 protocol.

PLEASE NOTE THAT THIS ENGINE WORKS ONLY FOR WEB-BASED APPLICATIONS.




[ Top ]


Class Variables

$assertion =

[line 120]



Tags:

access:  protected

Type:   mixed


[ Top ]

$as_id =

[line 124]



Tags:

access:  protected

Type:   mixed


[ Top ]

$attributes =

[line 123]



Tags:

access:  protected

Type:   mixed


[ Top ]

$cfg =

[line 131]



Tags:

access:  protected

Type:   mixed
Overrides:   Array


[ Top ]

$clean_url =  true

[line 132]



Tags:

access:  protected

Type:   mixed


[ Top ]

$cookie_name =  "PAPILcook_"

[line 134]



Tags:

access:  protected

Type:   mixed


[ Top ]

$db =

[line 129]



Tags:

access:  protected

Type:   mixed


[ Top ]

$enforcing =  true

[line 135]



Tags:

access:  protected

Type:   mixed


[ Top ]

$expiration_time =  false

[line 122]



Tags:

access:  protected

Type:   mixed


[ Top ]

$global_expire_time =

[line 128]



Tags:

access:  protected

Type:   mixed


[ Top ]

$id =

[line 130]



Tags:

access:  protected

Type:   mixed


[ Top ]

$key =

[line 125]



Tags:

access:  protected

Type:   mixed


[ Top ]

$lkey =

[line 126]



Tags:

access:  protected

Type:   mixed


[ Top ]

$opoa =  "http"

[line 136]



Tags:

access:  protected

Type:   mixed


[ Top ]

$pkey =

[line 127]



Tags:

access:  protected

Type:   mixed


[ Top ]

$skip_redirection =  false

[line 133]



Tags:

access:  protected

Type:   mixed


[ Top ]

$status =

[line 121]



Tags:

access:  protected

Type:   mixed


[ Top ]

$valid_hooks = array(PAPI_REDIRECT_URL_FINISH,
                                   PAPI_RESTORE_ORIGINAL_REQUEST,
                                   PAPI_CLEAN_URL,
                                   PAPI_ATTRIBUTE_PARSER)

[line 137]



Tags:

access:  protected

Type:   mixed
Overrides:   Array


[ Top ]



Class Methods


method attributeQuery [line 418]

void attributeQuery( $name)



Tags:

access:  protected


Parameters:

   $name  

[ Top ]

method authenticate [line 185]

void authenticate( )



Tags:

access:  public


Overrides AuthenticationEngine::authenticate() (Trigger the authentication of the user in the current context. May perform HTTP redirections or any other procedure to gather the authentication status if the user, so don't expect it to return control once called.)

[ Top ]

method configure [line 142]

void configure( $file, $section)



Tags:

access:  public


Overrides GenericEngine::configure() (Configure the engine.)

Parameters:

   $file  
   $section  

[ Top ]

method deleteCookie [line 473]

true deleteCookie( )

Delete the current cookie, if any.



Tags:

access:  protected


[ Top ]

method deleteRequest [line 755]

boolean deleteRequest( key $key)

Delete a request from the request database.



Tags:

return:  true if success, false in any other case.
access:  protected


Parameters:

key   $key   The key that identifies the request.

[ Top ]

method getAttribute [line 353]

void getAttribute( $name, [ $namespace = NS_PAPI_ATTRIBUTES])



Tags:

access:  public


Overrides AuthenticationEngine::getAttribute() (Get an specific attribute for the current user, by specifying its name and namespace. May trigger some attribute query procedure.)

Parameters:

   $name  
   $namespace  

[ Top ]

method getAttributes [line 325]

void getAttributes( )



Tags:

access:  public


Overrides AuthenticationEngine::getAttributes() (Get an associative array with the set of common attributes for the current user. May trigger some attribute recollection.)

[ Top ]

method getNewCookie [line 780]

string getNewCookie( )

Generate a new cookie for the current user.



Tags:

return:  The cookie conveniently encrypted with our own key.
access:  protected


[ Top ]

method getRedirectLocation [line 614]

string getRedirectLocation( )

Retrieve the URL where to redirect a user and store his request.



Tags:

return:  The appropriate URL where to redirect the browser, false if error.
access:  protected


[ Top ]

method getSingleLogoutLocation [line 574]

string getSingleLogoutLocation( )

Retrieve the URL where to redirect a user to perform a single logout.



Tags:

return:  The appropriate URL where to redirect the browser, false if error.
access:  protected


[ Top ]

method getSingleLogoutResponseLocation [line 598]

string getSingleLogoutResponseLocation( )

Retrieve the URL where to redirect a user once he has successfully logged out.



Tags:

return:  The appropriate URL where to redirect the browser, false if error.
access:  protected


[ Top ]

method isAuthenticated [line 315]

void isAuthenticated( )



Tags:

access:  public


Overrides AuthenticationEngine::isAuthenticated() (Check the current authentication status withing this context. Does not trigger any authentication procedure.)

[ Top ]

method isSafe [line 792]

boolean isSafe( )

Determines if it's safe to assume the user as authenticated.



Tags:

return:  true if the user still has a valid session, false otherwise.
access:  protected


[ Top ]

method loadRequest [line 711]

hash loadRequest( key $key)

Load a request from the request database.



Tags:

return:  The request associated with that key, false if error.
access:  protected


Parameters:

key   $key   The key that identifies the request.

[ Top ]

method logout [line 383]

void logout( [ $slo = false])



Tags:

access:  public


Overrides AuthenticationEngine::logout() (Perform a logout (locally or global).)

Parameters:

   $slo  

[ Top ]

method redirect [line 554]

void redirect( [location $location = ""])

Redirect user browser to the appropriate URL for authentication.

WARNING: This method ends execution.




Tags:

return:  This method does not return!
access:  protected


Parameters:

location   $location   If set, the location where to redirect the user. If not, defaults are used.

[ Top ]

method saveRequest [line 683]

string|boolean saveRequest( key $key, hli $hli)

Save a request to the request database. The request includes: $_REQUEST, $_GET, $_POST, $_SERVER['QUERY_STRING'], $_SERVER['REQUEST_METHOD'] and php://input.



Tags:

return:  The key to retrieve later this request from the database, false if error.
access:  protected


Parameters:

key   $key   The key identifier for this request.
hli   $hli   The home locator identifier that should be used for this request.

[ Top ]

method testCookie [line 430]

boolean testCookie( [cookie $name = ""])

Check if a cookie is valid.



Tags:

return:  true if the cookie is valid, false otherwise.
access:  protected


Parameters:

cookie   $name   The cookie.

[ Top ]

method testResponse [line 495]

boolean testResponse( data $data, key $pubkey)

Check the response from the AS/GPoA.



Tags:

return:  true if valid, false else.
access:  protected


Parameters:

data   $data   The data received.
key   $pubkey   The public key of the AS/GPoA.

[ Top ]


Documentation generated on Tue, 25 Jan 2011 11:24:34 +0100 by phpDocumentor 1.4.3