ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
Message.php File Reference

Go to the source code of this file.

Data Structures

class  Auth_OpenID_Mapping
 
class  Auth_OpenID_NamespaceMap
 
class  Auth_OpenID_Message
 

Namespaces

 OpenID
 This module contains code for dealing with associations between consumers and servers.
 

Functions

 Auth_OpenID_isOpenID1 ($ns)
 
 Auth_OpenID_registerNamespaceAlias ($namespace_uri, $alias)
 Registers a (namespace URI, alias) mapping in a global namespace alias map. More...
 
 Auth_OpenID_removeNamespaceAlias ($namespace_uri, $alias)
 Removes a (namespace_uri, alias) registration from the global namespace alias map. More...
 

Variables

const Auth_OpenID_IDENTIFIER_SELECT "http://specs.openid.net/auth/2.0/identifier_select"
 Import tools needed to deal with messages. More...
 
const Auth_OpenID_SREG_URI 'http://openid.net/sreg/1.0'
 
const Auth_OpenID_OPENID1_NS 'http://openid.net/signon/1.0'
 
const Auth_OpenID_THE_OTHER_OPENID1_NS 'http://openid.net/signon/1.1'
 
const Auth_OpenID_OPENID2_NS 'http://specs.openid.net/auth/2.0'
 
const Auth_OpenID_NULL_NAMESPACE 'Null namespace'
 
const Auth_OpenID_OPENID_NS 'OpenID namespace'
 
const Auth_OpenID_BARE_NS 'Bare namespace'
 
const Auth_OpenID_NO_DEFAULT 'NO DEFAULT ALLOWED'
 
const Auth_OpenID_OPENID1_URL_LIMIT 2047
 
global $Auth_OpenID_OPENID_PROTOCOL_FIELDS
 
global $Auth_OpenID_registered_aliases = array()
 

Function Documentation

◆ Auth_OpenID_isOpenID1()

Auth_OpenID_isOpenID1 (   $ns)

Definition at line 28 of file Message.php.

References Auth_OpenID_OPENID1_NS, and Auth_OpenID_THE_OTHER_OPENID1_NS.

Referenced by Auth_OpenID_Message\Auth_OpenID_Message(), and Auth_OpenID_Message\isOpenID1().

30 {
31  return ($ns == Auth_OpenID_THE_OTHER_OPENID1_NS) ||
32  ($ns == Auth_OpenID_OPENID1_NS);
const Auth_OpenID_THE_OTHER_OPENID1_NS
Definition: Message.php:26
const Auth_OpenID_OPENID1_NS
Definition: Message.php:25
+ Here is the caller graph for this function:

◆ Auth_OpenID_registerNamespaceAlias()

Auth_OpenID_registerNamespaceAlias (   $namespace_uri,
  $alias 
)

Registers a (namespace URI, alias) mapping in a global namespace alias map.

Raises NamespaceAliasRegistrationError if either the namespace URI or alias has already been registered with a different value. This function is required if you want to use a namespace with an OpenID 1 message.

Definition at line 77 of file Message.php.

79 {
81 
82  if (Auth_OpenID::arrayGet($Auth_OpenID_registered_aliases,
83  $alias) == $namespace_uri) {
84  return true;
85  }
86 
87  if (in_array($namespace_uri,
88  array_values($Auth_OpenID_registered_aliases))) {
89  return false;
90  }
91 
92  if (in_array($alias, array_keys($Auth_OpenID_registered_aliases))) {
93  return false;
94  }
95 
96  $Auth_OpenID_registered_aliases[$alias] = $namespace_uri;
97  return true;
global $Auth_OpenID_registered_aliases
Definition: Message.php:67
static arrayGet($arr, $key, $fallback=null)
Convenience function for getting array values.
Definition: OpenID.php:242

◆ Auth_OpenID_removeNamespaceAlias()

Auth_OpenID_removeNamespaceAlias (   $namespace_uri,
  $alias 
)

Removes a (namespace_uri, alias) registration from the global namespace alias map.

Returns true if the removal succeeded; false if not (if the mapping did not exist).

Definition at line 104 of file Message.php.

106 {
108 
109  if (Auth_OpenID::arrayGet($Auth_OpenID_registered_aliases,
110  $alias) === $namespace_uri) {
111  unset($Auth_OpenID_registered_aliases[$alias]);
112  return true;
113  }
114 
115  return false;
global $Auth_OpenID_registered_aliases
Definition: Message.php:67
static arrayGet($arr, $key, $fallback=null)
Convenience function for getting array values.
Definition: OpenID.php:242

Variable Documentation

◆ $Auth_OpenID_OPENID_PROTOCOL_FIELDS

$Auth_OpenID_OPENID_PROTOCOL_FIELDS
Initial value:
= array(
'ns', 'mode', 'error', 'return_to', 'contact', 'reference',
'signed', 'assoc_type', 'session_type', 'dh_modulus', 'dh_gen',
'dh_consumer_public', 'claimed_id', 'identity', 'realm',
'invalidate_handle', 'op_endpoint', 'response_nonce', 'sig',
'assoc_handle', 'trust_root', 'openid')

Definition at line 57 of file Message.php.

Referenced by Auth_OpenID_NamespaceMap\addAlias().

◆ $Auth_OpenID_registered_aliases

$Auth_OpenID_registered_aliases = array()

◆ Auth_OpenID_BARE_NS

◆ Auth_OpenID_IDENTIFIER_SELECT

const Auth_OpenID_IDENTIFIER_SELECT "http://specs.openid.net/auth/2.0/identifier_select"

Import tools needed to deal with messages.

Definition at line 18 of file Message.php.

Referenced by Auth_OpenID_CheckIDRequest\answer(), Auth_OpenID_AuthRequest\getMessage(), and Auth_OpenID_CheckIDRequest\idSelect().

◆ Auth_OpenID_NO_DEFAULT

◆ Auth_OpenID_NULL_NAMESPACE

◆ Auth_OpenID_OPENID1_NS

◆ Auth_OpenID_OPENID1_URL_LIMIT

const Auth_OpenID_OPENID1_URL_LIMIT 2047

◆ Auth_OpenID_OPENID2_NS

◆ Auth_OpenID_OPENID_NS

const Auth_OpenID_OPENID_NS 'OpenID namespace'

Definition at line 42 of file Message.php.

Referenced by Auth_OpenID_GenericConsumer\_checkReturnTo(), Auth_OpenID_GenericConsumer\_complete_error(), Auth_OpenID_GenericConsumer\_completeInvalid(), Auth_OpenID_GenericConsumer\_createCheckAuthRequest(), Auth_OpenID_GenericConsumer\_doIdRes(), Auth_OpenID_GenericConsumer\_extractAssociation(), Auth_OpenID_GenericConsumer\_extractSupportedAssociationType(), Auth_OpenID_GenericConsumer\_idResCheckForFields(), Auth_OpenID_GenericConsumer\_idResCheckSignature(), Auth_OpenID_Association\_makePairs(), Auth_OpenID_GenericConsumer\_processCheckAuthResponse(), Auth_OpenID_GenericConsumer\_verifyReturnToArgs(), Auth_OpenID_CheckAuthRequest\answer(), Auth_OpenID_AssociateRequest\answer(), Auth_OpenID_CheckIDRequest\answer(), Auth_OpenID_AssociateRequest\answerUnsupported(), Auth_OpenID_AX_FetchRequest\Auth_OpenID_AX_FetchRequest(), Auth_OpenID_Association\checkMessageSignature(), Auth_OpenID_GenericConsumer\complete(), Auth_OpenID_Decoder\decode(), Auth_OpenID_Decoder\defaultDecoder(), Auth_OpenID_SigningEncoder\encode(), Auth_OpenID_CheckIDRequest\encodeToURL(), Auth_OpenID_DiffieHellmanSHA1ConsumerSession\extractSecret(), Auth_OpenID_PlainTextConsumerSession\extractSecret(), Auth_OpenID_CheckAuthRequest\fromMessage(), Auth_OpenID_AssociateRequest\fromMessage(), Auth_OpenID_CheckIDRequest\fromMessage(), Auth_OpenID_ServerErrorContainer\fromMessage(), Auth_OpenID_Message\fromOpenIDArgs(), Auth_OpenID_CheckIDRequest\getCancelURL(), Auth_OpenID_DiffieHellmanSHA1ServerSession\getDH(), Auth_OpenID_AuthRequest\getMessage(), Auth_OpenID_ServerError\getReturnTo(), Auth_OpenID_SuccessResponse\getReturnTo(), Auth_OpenID_ServerResponse\needsSigning(), Auth_OpenID_Signatory\sign(), Auth_OpenID_Association\signMessage(), Auth_OpenID_ServerError\toMessage(), Auth_OpenID_Message\toURLEncoded(), and Auth_OpenID_ServerError\whichEncoding().

◆ Auth_OpenID_SREG_URI

const Auth_OpenID_SREG_URI 'http://openid.net/sreg/1.0'

Definition at line 22 of file Message.php.

Referenced by Auth_OpenID_Message\toURLEncoded().

◆ Auth_OpenID_THE_OTHER_OPENID1_NS

const Auth_OpenID_THE_OTHER_OPENID1_NS 'http://openid.net/signon/1.1'

Definition at line 26 of file Message.php.

Referenced by Auth_OpenID_isOpenID1(), and Auth_OpenID_Message\Auth_OpenID_Message().