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

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




[ Top ]


Class Variables

$assertion =

[line 113]



Tags:

access:  protected

Type:   mixed


[ Top ]

$as_id =

[line 117]



Tags:

access:  protected

Type:   mixed


[ Top ]

$attributes =

[line 116]



Tags:

access:  protected

Type:   mixed


[ Top ]

$cfg =

[line 124]



Tags:

access:  protected

Type:   mixed
Overrides:   Array


[ Top ]

$clean_url =  true

[line 126]



Tags:

access:  protected

Type:   mixed


[ Top ]

$cookie_name =  "PAPILcook_"

[line 128]



Tags:

access:  protected

Type:   mixed


[ Top ]

$crypto =

[line 125]



Tags:

access:  protected

Type:   mixed


[ Top ]

$db =

[line 122]



Tags:

access:  protected

Type:   mixed


[ Top ]

$enforcing =  true

[line 129]



Tags:

access:  protected

Type:   mixed


[ Top ]

$expiration_time =  false

[line 115]



Tags:

access:  protected

Type:   mixed


[ Top ]

$global_expire_time =

[line 121]



Tags:

access:  protected

Type:   mixed


[ Top ]

$id =

[line 123]



Tags:

access:  protected

Type:   mixed


[ Top ]

$key =

[line 118]



Tags:

access:  protected

Type:   mixed


[ Top ]

$lkey =

[line 119]



Tags:

access:  protected

Type:   mixed


[ Top ]

$opoa =  "http"

[line 130]



Tags:

access:  protected

Type:   mixed


[ Top ]

$pkey =

[line 120]



Tags:

access:  protected

Type:   mixed


[ Top ]

$skip_redirection =  false

[line 127]



Tags:

access:  protected

Type:   mixed


[ Top ]

$status =

[line 114]



Tags:

access:  protected

Type:   mixed


[ Top ]

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

[line 131]



Tags:

access:  protected

Type:   mixed
Overrides:   Array


[ Top ]



Class Methods


method attributeQuery [line 401]

void attributeQuery( $name)



Tags:

access:  protected


Parameters:

   $name  

[ Top ]

method authenticate [line 168]

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 136]

void configure( $file, $section)



Tags:

access:  public


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

Parameters:

   $file  
   $section  

[ Top ]

method deleteCookie [line 456]

true deleteCookie( )

Delete the current cookie, if any.



Tags:

access:  protected


[ Top ]

method deleteRequest [line 738]

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 336]

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 308]

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 763]

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 597]

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 557]

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 581]

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 298]

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 775]

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 694]

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 366]

void logout( [ $slo = false])



Tags:

access:  public


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

Parameters:

   $slo  

[ Top ]

method redirect [line 537]

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 666]

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 413]

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 478]

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, 14 Jun 2011 12:22:14 +0200 by phpDocumentor 1.4.3