OpenIdConsumer Class Reference
[OpenId implementation]

openId consumer library entry point More...

List of all members.

Public Member Functions

 __construct (RandomSource $randomSource, BigNumberFactory $numberFactory, HttpClient $httpClient)
 associate (HttpUrl $server, OpenIdConsumerAssociationManager $manager)
 "associate" mode request
 checkIdImmediate (OpenIdCredentials $credentials, HttpUrl $returnTo, $trustRoot=null, $association=null)
 "checkid_immediate" mode request
 checkIdSetup (OpenIdCredentials $credentials, HttpUrl $returnTo, $trustRoot=null, $association=null)
 "checkid_setup" mode request
 doContinue (HttpRequest $request, $manager=null)
 proceed results of checkid_immediate and checkid_setup

Static Public Member Functions

static create (RandomSource $randomSource, BigNumberFactory $numberFactory, HttpClient $httpClient)
 
Returns:
OpenIdConsumer


Public Attributes

const DIFFIE_HELLMAN_P = '155172898181473697471232257763715539915724801966915404479707795314057629378541917580651227423698188993727816152646631438561595825688188889951272158842675419950341258706556549803580104870537681476726513255747040765857479291291572334510643245094715007229621094194349783925984760375594985848253359305585439638443'
const DIFFIE_HELLMAN_G = 2
const ASSOCIATION_TYPE = 'HMAC-SHA1'

Private Member Functions

 makeCheckIdRequest (OpenIdCredentials $credentials, HttpUrl $returnTo, $trustRoot=null, $association=null)
 checkAuthentication ($parameters, $manager=null)
 check_authentication mode request
 parseKeyValueFormat ($raw)
 parseGetParameters ($get)

Private Attributes

 $randomSource = null
 $numberFactory = null
 $httpClient = null


Detailed Description

openId consumer library entry point

See also:
http://openid.net/specs/openid-authentication-1_1.html
Todo:
use nonce to limit time frame of replay attacks

Definition at line 21 of file OpenIdConsumer.class.php.


Constructor & Destructor Documentation

OpenIdConsumer::__construct ( RandomSource randomSource,
BigNumberFactory numberFactory,
HttpClient httpClient 
)

Definition at line 31 of file OpenIdConsumer.class.php.


Member Function Documentation

static OpenIdConsumer::create ( RandomSource randomSource,
BigNumberFactory numberFactory,
HttpClient httpClient 
) [static]

Returns:
OpenIdConsumer

Definition at line 45 of file OpenIdConsumer.class.php.

OpenIdConsumer::associate ( HttpUrl server,
OpenIdConsumerAssociationManager manager 
)

"associate" mode request

Parameters:
$server to make association with (usually obtained from OpenIdCredentials)
$manager - dao-like association manager
Returns:
OpenIdConsumerAssociation

Definition at line 61 of file OpenIdConsumer.class.php.

References HttpStatus::CODE_200, HttpRequest::create(), DiffieHellmanKeyPair::generate(), Assert::isTrue(), OpenIdConsumerAssociationManager::makeAndSave(), Timestamp::makeNow(), parseKeyValueFormat(), and HttpMethod::post().

Here is the call graph for this function:

OpenIdConsumer::makeCheckIdRequest ( OpenIdCredentials credentials,
HttpUrl returnTo,
trustRoot = null,
association = null 
) [private]

Definition at line 157 of file OpenIdConsumer.class.php.

References ModelAndView::create(), Model::create(), RedirectView::create(), OpenIdCredentials::getRealId(), Assert::isTrue(), and GenericUri::toString().

Referenced by checkIdImmediate(), and checkIdSetup().

Here is the call graph for this function:

OpenIdConsumer::checkIdImmediate ( OpenIdCredentials credentials,
HttpUrl returnTo,
trustRoot = null,
association = null 
)

"checkid_immediate" mode request

Parameters:
$credentials - id and server urls
$returnTo - URL where the provider should return the User-Agent back to
$trustRoot - URL the Provider shall ask the End User to trust
$association - result of associate call in smart mode
Returns:
ModelAndView

Definition at line 217 of file OpenIdConsumer.class.php.

References makeCheckIdRequest().

Here is the call graph for this function:

OpenIdConsumer::checkIdSetup ( OpenIdCredentials credentials,
HttpUrl returnTo,
trustRoot = null,
association = null 
)

"checkid_setup" mode request

Parameters:
$credentials - id and server urls
$returnTo - URL where the provider should return the User-Agent back to
$trustRoot - URL the Provider shall ask the End User to trust
$association - result of associate call in smart mode
Returns:
ModelAndView

Definition at line 246 of file OpenIdConsumer.class.php.

References makeCheckIdRequest().

Here is the call graph for this function:

OpenIdConsumer::doContinue ( HttpRequest request,
manager = null 
)

proceed results of checkid_immediate and checkid_setup

Parameters:
$request incoming request
 

Definition at line 272 of file OpenIdConsumer.class.php.

References checkAuthentication(), HttpUrl::create(), CryptoFunctions::hmacsha1(), Assert::isTrue(), and parseGetParameters().

Here is the call graph for this function:

OpenIdConsumer::checkAuthentication ( parameters,
manager = null 
) [private]

check_authentication mode request

Definition at line 366 of file OpenIdConsumer.class.php.

References HttpStatus::CODE_200, HttpRequest::create(), HttpUrl::create(), parseKeyValueFormat(), and HttpMethod::post().

Referenced by doContinue().

Here is the call graph for this function:

OpenIdConsumer::parseKeyValueFormat ( raw  )  [private]

Definition at line 434 of file OpenIdConsumer.class.php.

Referenced by associate(), and checkAuthentication().

OpenIdConsumer::parseGetParameters ( get  )  [private]

Definition at line 449 of file OpenIdConsumer.class.php.

Referenced by doContinue().


Member Data Documentation

const OpenIdConsumer::DIFFIE_HELLMAN_P = '155172898181473697471232257763715539915724801966915404479707795314057629378541917580651227423698188993727816152646631438561595825688188889951272158842675419950341258706556549803580104870537681476726513255747040765857479291291572334510643245094715007229621094194349783925984760375594985848253359305585439638443'

Definition at line 23 of file OpenIdConsumer.class.php.

const OpenIdConsumer::DIFFIE_HELLMAN_G = 2

Definition at line 24 of file OpenIdConsumer.class.php.

const OpenIdConsumer::ASSOCIATION_TYPE = 'HMAC-SHA1'

Definition at line 25 of file OpenIdConsumer.class.php.

OpenIdConsumer::$randomSource = null [private]

Definition at line 27 of file OpenIdConsumer.class.php.

OpenIdConsumer::$numberFactory = null [private]

Definition at line 28 of file OpenIdConsumer.class.php.

OpenIdConsumer::$httpClient = null [private]

Definition at line 29 of file OpenIdConsumer.class.php.


The documentation for this class was generated from the following file:
Generated on Sun Dec 9 21:58:04 2007 for onPHP by  doxygen 1.5.4