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::configure()
Configure the engine.
GenericEngine::removeHook()
Removes a function fromt he specified hook.
GenericEngine::runHooks()
Run all hooks attached to an specific action.

Class Details

[line 112]
Authentication engine for the PAPI 1.5 protocol.



[ Top ]


Class Variables

$assertion =

[line 114]



Tags:

access:  protected

Type:   mixed


[ Top ]

$as_id =

[line 118]



Tags:

access:  protected

Type:   mixed


[ Top ]

$attributes =

[line 117]



Tags:

access:  protected

Type:   mixed


[ Top ]

$cfg =

[line 125]



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 ]

$db =

[line 123]



Tags:

access:  protected

Type:   mixed


[ Top ]

$enforcing =  true

[line 129]



Tags:

access:  protected

Type:   mixed


[ Top ]

$expiration_time =  false

[line 116]



Tags:

access:  protected

Type:   mixed


[ Top ]

$global_expire_time =

[line 122]



Tags:

access:  protected

Type:   mixed


[ Top ]

$id =

[line 124]



Tags:

access:  protected

Type:   mixed


[ Top ]

$key =

[line 119]



Tags:

access:  protected

Type:   mixed


[ Top ]

$lkey =

[line 120]



Tags:

access:  protected

Type:   mixed


[ Top ]

$opoa =  "http"

[line 130]



Tags:

access:  protected

Type:   mixed


[ Top ]

$pkey =

[line 121]



Tags:

access:  protected

Type:   mixed


[ Top ]

$skip_redirection =  false

[line 127]



Tags:

access:  protected

Type:   mixed


[ Top ]

$status =

[line 115]



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

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

true deleteCookie( )

Delete the current cookie, if any.



Tags:

access:  protected


[ Top ]

method deleteRequest [line 754]

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

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

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

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

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

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

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

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

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

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 Thu, 26 Aug 2010 13:38:53 +0200 by phpDocumentor 1.4.3