ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Auth_OpenID_SuccessResponse Class Reference
+ Inheritance diagram for Auth_OpenID_SuccessResponse:
+ Collaboration diagram for Auth_OpenID_SuccessResponse:

Public Member Functions

 Auth_OpenID_SuccessResponse ($endpoint, $message, $signed_args=null)
 @access private More...
 
 extensionResponse ($namespace_uri, $require_signed)
 Extract signed extension data from the server's response. More...
 
 isOpenID1 ()
 
 isSigned ($ns_uri, $ns_key)
 
 getSigned ($ns_uri, $ns_key, $default=null)
 
 getSignedNS ($ns_uri)
 
 getReturnTo ()
 Get the openid.return_to argument from this response. More...
 
- Public Member Functions inherited from Auth_OpenID_ConsumerResponse
 setEndpoint ($endpoint)
 
 getDisplayIdentifier ()
 Return the display identifier for this response. More...
 

Data Fields

 $status = Auth_OpenID_SUCCESS
 
- Data Fields inherited from Auth_OpenID_ConsumerResponse
 $status = null
 

Detailed Description

Definition at line 2024 of file Consumer.php.

Member Function Documentation

◆ Auth_OpenID_SuccessResponse()

Auth_OpenID_SuccessResponse::Auth_OpenID_SuccessResponse (   $endpoint,
  $message,
  $signed_args = null 
)

@access private

Definition at line 2030 of file Consumer.php.

2031 {
2032 $this->endpoint = $endpoint;
2033 $this->identity_url = $endpoint->claimed_id;
2034 $this->signed_args = $signed_args;
2035 $this->message = $message;
2036
2037 if ($this->signed_args === null) {
2038 $this->signed_args = array();
2039 }
2040 }

◆ extensionResponse()

Auth_OpenID_SuccessResponse::extensionResponse (   $namespace_uri,
  $require_signed 
)

Extract signed extension data from the server's response.

Parameters
string$prefixThe extension namespace from which to extract the extension data.

Definition at line 2048 of file Consumer.php.

2049 {
2050 if ($require_signed) {
2051 return $this->getSignedNS($namespace_uri);
2052 } else {
2053 return $this->message->getArgs($namespace_uri);
2054 }
2055 }

References getSignedNS().

+ Here is the call graph for this function:

◆ getReturnTo()

Auth_OpenID_SuccessResponse::getReturnTo ( )

Get the openid.return_to argument from this response.

This is useful for verifying that this request was initiated by this consumer.

Returns
string $return_to The return_to URL supplied to the server on the initial request, or null if the response did not contain an 'openid.return_to' argument.

Definition at line 2109 of file Consumer.php.

2110 {
2111 return $this->getSigned(Auth_OpenID_OPENID_NS, 'return_to');
2112 }
const Auth_OpenID_OPENID_NS
Definition: Message.php:42
getSigned($ns_uri, $ns_key, $default=null)
Definition: Consumer.php:2070

References Auth_OpenID_OPENID_NS, and getSigned().

+ Here is the call graph for this function:

◆ getSigned()

Auth_OpenID_SuccessResponse::getSigned (   $ns_uri,
  $ns_key,
  $default = null 
)

Definition at line 2070 of file Consumer.php.

2071 {
2072 // Return the specified signed field if available, otherwise
2073 // return default
2074 if ($this->isSigned($ns_uri, $ns_key)) {
2075 return $this->message->getArg($ns_uri, $ns_key, $default);
2076 } else {
2077 return $default;
2078 }
2079 }
isSigned($ns_uri, $ns_key)
Definition: Consumer.php:2062

References isSigned().

Referenced by getReturnTo().

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

◆ getSignedNS()

Auth_OpenID_SuccessResponse::getSignedNS (   $ns_uri)

Definition at line 2081 of file Consumer.php.

2082 {
2083 $args = array();
2084
2085 $msg_args = $this->message->getArgs($ns_uri);
2086 if (Auth_OpenID::isFailure($msg_args)) {
2087 return null;
2088 }
2089
2090 foreach ($msg_args as $key => $value) {
2091 if (!$this->isSigned($ns_uri, $key)) {
2092 unset($msg_args[$key]);
2093 }
2094 }
2095
2096 return $msg_args;
2097 }
static isFailure($thing)
Return true if $thing is an Auth_OpenID_FailureResponse object; false if not.
Definition: OpenID.php:118

References Auth_OpenID\isFailure(), and isSigned().

Referenced by extensionResponse().

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

◆ isOpenID1()

Auth_OpenID_SuccessResponse::isOpenID1 ( )

Definition at line 2057 of file Consumer.php.

2058 {
2059 return $this->message->isOpenID1();
2060 }

◆ isSigned()

Auth_OpenID_SuccessResponse::isSigned (   $ns_uri,
  $ns_key 
)

Definition at line 2062 of file Consumer.php.

2063 {
2064 // Return whether a particular key is signed, regardless of
2065 // its namespace alias
2066 return in_array($this->message->getKey($ns_uri, $ns_key),
2067 $this->signed_args);
2068 }

Referenced by getSigned(), and getSignedNS().

+ Here is the caller graph for this function:

Field Documentation

◆ $status

Auth_OpenID_SuccessResponse::$status = Auth_OpenID_SUCCESS

Definition at line 2025 of file Consumer.php.


The documentation for this class was generated from the following file: