ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Association.php File Reference

Go to the source code of this file.

Data Structures

class  Auth_OpenID_Association
 
class  Auth_OpenID_SessionNegotiator
 

Namespaces

namespace  OpenID
 This is the PHP OpenID library by JanRain, Inc.
 

Functions

 Auth_OpenID_getSecretSize ($assoc_type)
 
 Auth_OpenID_getAllAssociationTypes ()
 
 Auth_OpenID_getSupportedAssociationTypes ()
 
 Auth_OpenID_getSessionTypes ($assoc_type)
 
 Auth_OpenID_checkSessionType ($assoc_type, $session_type)
 
 Auth_OpenID_getDefaultAssociationOrder ()
 
 Auth_OpenID_getOnlyEncryptedOrder ()
 
 Auth_OpenID_getDefaultNegotiator ()
 
 Auth_OpenID_getEncryptedNegotiator ()
 

Function Documentation

◆ Auth_OpenID_checkSessionType()

Auth_OpenID_checkSessionType (   $assoc_type,
  $session_type 
)

Definition at line 421 of file Association.php.

422{
423 if (!in_array($session_type,
424 Auth_OpenID_getSessionTypes($assoc_type))) {
425 return false;
426 }
427
428 return true;
429}
Auth_OpenID_getSessionTypes($assoc_type)

References Auth_OpenID_getSessionTypes().

Referenced by Auth_OpenID_SessionNegotiator\addAllowedType(), and Auth_OpenID_SessionNegotiator\setAllowedTypes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Auth_OpenID_getAllAssociationTypes()

Auth_OpenID_getAllAssociationTypes ( )

Definition at line 392 of file Association.php.

393{
394 return array('HMAC-SHA1', 'HMAC-SHA256');
395}

◆ Auth_OpenID_getDefaultAssociationOrder()

Auth_OpenID_getDefaultAssociationOrder ( )

Definition at line 431 of file Association.php.

432{
433 $order = array();
434
436 $order[] = array('HMAC-SHA1', 'DH-SHA1');
437
438 if (Auth_OpenID_HMACSHA256_SUPPORTED) {
439 $order[] = array('HMAC-SHA256', 'DH-SHA256');
440 }
441 }
442
443 $order[] = array('HMAC-SHA1', 'no-encryption');
444
445 if (Auth_OpenID_HMACSHA256_SUPPORTED) {
446 $order[] = array('HMAC-SHA256', 'no-encryption');
447 }
448
449 return $order;
450}
Auth_OpenID_noMathSupport()
Definition: BigMath.php:447

References Auth_OpenID_noMathSupport().

Referenced by Auth_OpenID_getDefaultNegotiator(), and Auth_OpenID_getOnlyEncryptedOrder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Auth_OpenID_getDefaultNegotiator()

Auth_OpenID_getDefaultNegotiator ( )

Definition at line 472 of file Association.php.

References Auth_OpenID_getDefaultAssociationOrder().

Referenced by Auth_OpenID_GenericConsumer\Auth_OpenID_GenericConsumer(), and Auth_OpenID_Server\Auth_OpenID_Server().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Auth_OpenID_getEncryptedNegotiator()

Auth_OpenID_getEncryptedNegotiator ( )

Definition at line 478 of file Association.php.

479{
482}
Auth_OpenID_getOnlyEncryptedOrder()

References Auth_OpenID_getOnlyEncryptedOrder().

+ Here is the call graph for this function:

◆ Auth_OpenID_getOnlyEncryptedOrder()

Auth_OpenID_getOnlyEncryptedOrder ( )

Definition at line 452 of file Association.php.

453{
454 $result = array();
455
456 foreach (Auth_OpenID_getDefaultAssociationOrder() as $pair) {
457 list($assoc, $session) = $pair;
458
459 if ($session != 'no-encryption') {
460 if (Auth_OpenID_HMACSHA256_SUPPORTED &&
461 ($assoc == 'HMAC-SHA256')) {
462 $result[] = $pair;
463 } else if ($assoc != 'HMAC-SHA256') {
464 $result[] = $pair;
465 }
466 }
467 }
468
469 return $result;
470}
$result

References $result, and Auth_OpenID_getDefaultAssociationOrder().

Referenced by Auth_OpenID_getEncryptedNegotiator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Auth_OpenID_getSecretSize()

Auth_OpenID_getSecretSize (   $assoc_type)

Definition at line 381 of file Association.php.

382{
383 if ($assoc_type == 'HMAC-SHA1') {
384 return 20;
385 } else if ($assoc_type == 'HMAC-SHA256') {
386 return 32;
387 } else {
388 return null;
389 }
390}

Referenced by Auth_OpenID_Signatory\createAssociation().

+ Here is the caller graph for this function:

◆ Auth_OpenID_getSessionTypes()

Auth_OpenID_getSessionTypes (   $assoc_type)

Definition at line 408 of file Association.php.

409{
410 $assoc_to_session = array(
411 'HMAC-SHA1' => array('DH-SHA1', 'no-encryption'));
412
413 if (Auth_OpenID_HMACSHA256_SUPPORTED) {
414 $assoc_to_session['HMAC-SHA256'] =
415 array('DH-SHA256', 'no-encryption');
416 }
417
418 return Auth_OpenID::arrayGet($assoc_to_session, $assoc_type, array());
419}
static arrayGet($arr, $key, $fallback=null)
Convenience function for getting array values.
Definition: OpenID.php:242

References Auth_OpenID\arrayGet().

Referenced by Auth_OpenID_SessionNegotiator\addAllowedType(), Auth_OpenID_checkSessionType(), and Auth_OpenID_SessionNegotiator\isAllowed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Auth_OpenID_getSupportedAssociationTypes()

Auth_OpenID_getSupportedAssociationTypes ( )

Definition at line 397 of file Association.php.

398{
399 $a = array('HMAC-SHA1');
400
401 if (Auth_OpenID_HMACSHA256_SUPPORTED) {
402 $a[] = 'HMAC-SHA256';
403 }
404
405 return $a;
406}

Referenced by Auth_OpenID_Association\Auth_OpenID_Association().

+ Here is the caller graph for this function: