Auth/OpenID/Association.php-Dateireferenz

gehe zum Quellcode dieser Datei

Datenstrukturen

class  Auth_OpenID_Association
class  Auth_OpenID_SessionNegotiator

Namensbereiche

namespace  OpenID

Funktionen

 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 ()


Dokumentation der Funktionen

Auth_OpenID_checkSessionType ( assoc_type,
session_type 
)

Definiert in Zeile 421 der Datei Association.php.

00422 {
00423     if (!in_array($session_type,
00424                   Auth_OpenID_getSessionTypes($assoc_type))) {
00425         return false;
00426     }
00427 
00428     return true;
00429 }

Auth_OpenID_getAllAssociationTypes (  ) 

Definiert in Zeile 392 der Datei Association.php.

00393 {
00394     return array('HMAC-SHA1', 'HMAC-SHA256');
00395 }

Auth_OpenID_getDefaultAssociationOrder (  ) 

Definiert in Zeile 431 der Datei Association.php.

00432 {
00433     $order = array();
00434 
00435     if (!Auth_OpenID_noMathSupport()) {
00436         $order[] = array('HMAC-SHA1', 'DH-SHA1');
00437 
00438         if (Auth_OpenID_HMACSHA256_SUPPORTED) {
00439             $order[] = array('HMAC-SHA256', 'DH-SHA256');
00440         }
00441     }
00442 
00443     $order[] = array('HMAC-SHA1', 'no-encryption');
00444 
00445     if (Auth_OpenID_HMACSHA256_SUPPORTED) {
00446         $order[] = array('HMAC-SHA256', 'no-encryption');
00447     }
00448 
00449     return $order;
00450 }

& Auth_OpenID_getDefaultNegotiator (  ) 

Definiert in Zeile 472 der Datei Association.php.

00473 {
00474     $x = new Auth_OpenID_SessionNegotiator(
00475                  Auth_OpenID_getDefaultAssociationOrder());
00476     return $x;
00477 }

& Auth_OpenID_getEncryptedNegotiator (  ) 

Definiert in Zeile 479 der Datei Association.php.

00480 {
00481     $x = new Auth_OpenID_SessionNegotiator(
00482                  Auth_OpenID_getOnlyEncryptedOrder());
00483     return $x;
00484 }

Auth_OpenID_getOnlyEncryptedOrder (  ) 

Definiert in Zeile 452 der Datei Association.php.

00453 {
00454     $result = array();
00455 
00456     foreach (Auth_OpenID_getDefaultAssociationOrder() as $pair) {
00457         list($assoc, $session) = $pair;
00458 
00459         if ($session != 'no-encryption') {
00460             if (Auth_OpenID_HMACSHA256_SUPPORTED &&
00461                 ($assoc == 'HMAC-SHA256')) {
00462                 $result[] = $pair;
00463             } else if ($assoc != 'HMAC-SHA256') {
00464                 $result[] = $pair;
00465             }
00466         }
00467     }
00468 
00469     return $result;
00470 }

Auth_OpenID_getSecretSize ( assoc_type  ) 

Definiert in Zeile 381 der Datei Association.php.

00382 {
00383     if ($assoc_type == 'HMAC-SHA1') {
00384         return 20;
00385     } else if ($assoc_type == 'HMAC-SHA256') {
00386         return 32;
00387     } else {
00388         return null;
00389     }
00390 }

Auth_OpenID_getSessionTypes ( assoc_type  ) 

Definiert in Zeile 408 der Datei Association.php.

00409 {
00410     $assoc_to_session = array(
00411        'HMAC-SHA1' => array('DH-SHA1', 'no-encryption'));
00412 
00413     if (Auth_OpenID_HMACSHA256_SUPPORTED) {
00414         $assoc_to_session['HMAC-SHA256'] =
00415             array('DH-SHA256', 'no-encryption');
00416     }
00417 
00418     return Auth_OpenID::arrayGet($assoc_to_session, $assoc_type, array());
00419 }

Auth_OpenID_getSupportedAssociationTypes (  ) 

Definiert in Zeile 397 der Datei Association.php.

00398 {
00399     $a = array('HMAC-SHA1');
00400 
00401     if (Auth_OpenID_HMACSHA256_SUPPORTED) {
00402         $a[] = 'HMAC-SHA256';
00403     }
00404 
00405     return $a;
00406 }

Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved.
MyOOS [Shopsystem] is Free Software released under the GNU/GPL License.

Webmaster: info@r23.de (Impressum)
doxygen