ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_OpenID_ServerError Class Reference
+ Inheritance diagram for Auth_OpenID_ServerError:
+ Collaboration diagram for Auth_OpenID_ServerError:

Public Member Functions

 Auth_OpenID_ServerError ($message=null, $text=null, $reference=null, $contact=null)
 private
 getReturnTo ()
 hasReturnTo ()
 Returns the return_to URL for the request which caused this error.
 encodeToURL ()
 Encodes this error's response as a URL suitable for redirection.
 encodeToKVForm ()
 Encodes the response to key-value form.
 toFormMarkup ($form_tag_attrs=null)
 toHTML ($form_tag_attrs=null)
 toMessage ()
 whichEncoding ()
 Returns one of Auth_OpenID_ENCODE_URL, Auth_OpenID_ENCODE_KVFORM, or null, depending on the type of encoding expected for this error's payload.
 toString ()
 Returns this error message.

Detailed Description

Definition at line 147 of file Server.php.

Member Function Documentation

Auth_OpenID_ServerError::Auth_OpenID_ServerError (   $message = null,
  $text = null,
  $reference = null,
  $contact = null 
)

private

Definition at line 151 of file Server.php.

Referenced by Auth_OpenID_MalformedReturnURL\Auth_OpenID_MalformedReturnURL(), Auth_OpenID_MalformedTrustRoot\Auth_OpenID_MalformedTrustRoot(), Auth_OpenID_NoReturnToError\Auth_OpenID_NoReturnToError(), and Auth_OpenID_UntrustedReturnURL\Auth_OpenID_UntrustedReturnURL().

{
$this->message = $message;
$this->text = $text;
$this->contact = $contact;
$this->reference = $reference;
}

+ Here is the caller graph for this function:

Auth_OpenID_ServerError::encodeToKVForm ( )

Encodes the response to key-value form.

This is a machine-readable format used to respond to messages which came directly from the consumer and not through the user-agent. See the OpenID specification.

Definition at line 201 of file Server.php.

References Auth_OpenID_KVForm\fromArray(), and toString().

{
array('mode' => 'error',
'error' => $this->toString()));
}

+ Here is the call graph for this function:

Auth_OpenID_ServerError::encodeToURL ( )

Encodes this error's response as a URL suitable for redirection.

If the response has no return_to, another Auth_OpenID_ServerError is returned.

Definition at line 185 of file Server.php.

References getReturnTo(), and toMessage().

Referenced by whichEncoding().

{
if (!$this->message) {
return null;
}
$msg = $this->toMessage();
return $msg->toURL($this->getReturnTo());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_OpenID_ServerError::getReturnTo ( )

Definition at line 160 of file Server.php.

References Auth_OpenID_OPENID_NS.

Referenced by encodeToURL(), hasReturnTo(), and toFormMarkup().

{
if ($this->message &&
$this->message->hasKey(Auth_OpenID_OPENID_NS, 'return_to')) {
return $this->message->getArg(Auth_OpenID_OPENID_NS,
'return_to');
} else {
return null;
}
}

+ Here is the caller graph for this function:

Auth_OpenID_ServerError::hasReturnTo ( )

Returns the return_to URL for the request which caused this error.

Definition at line 175 of file Server.php.

References getReturnTo().

Referenced by whichEncoding().

{
return $this->getReturnTo() !== null;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_OpenID_ServerError::toFormMarkup (   $form_tag_attrs = null)

Definition at line 208 of file Server.php.

References getReturnTo(), and toMessage().

Referenced by toHTML().

{
$msg = $this->toMessage();
return $msg->toFormMarkup($this->getReturnTo(), $form_tag_attrs);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_OpenID_ServerError::toHTML (   $form_tag_attrs = null)

Definition at line 214 of file Server.php.

References Auth_OpenID\autoSubmitHTML(), and toFormMarkup().

{
$this->toFormMarkup($form_tag_attrs));
}

+ Here is the call graph for this function:

Auth_OpenID_ServerError::toMessage ( )

Definition at line 220 of file Server.php.

References $namespace, Auth_OpenID_OPENID_NS, and toString().

Referenced by encodeToURL(), and toFormMarkup().

{
// Generate a Message object for sending to the relying party,
// after encoding.
$namespace = $this->message->getOpenIDNamespace();
$reply->setArg(Auth_OpenID_OPENID_NS, 'mode', 'error');
$reply->setArg(Auth_OpenID_OPENID_NS, 'error', $this->toString());
if ($this->contact !== null) {
$reply->setArg(Auth_OpenID_OPENID_NS, 'contact', $this->contact);
}
if ($this->reference !== null) {
$reply->setArg(Auth_OpenID_OPENID_NS, 'reference',
$this->reference);
}
return $reply;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_OpenID_ServerError::toString ( )

Returns this error message.

Reimplemented in Auth_OpenID_UntrustedReturnURL, Auth_OpenID_MalformedTrustRoot, and Auth_OpenID_NoReturnToError.

Definition at line 278 of file Server.php.

Referenced by encodeToKVForm(), and toMessage().

{
if ($this->text) {
return $this->text;
} else {
return get_class($this) . " error";
}
}

+ Here is the caller graph for this function:

Auth_OpenID_ServerError::whichEncoding ( )

Returns one of Auth_OpenID_ENCODE_URL, Auth_OpenID_ENCODE_KVFORM, or null, depending on the type of encoding expected for this error's payload.

Definition at line 246 of file Server.php.

References $_Auth_OpenID_Request_Modes, Auth_OpenID_ENCODE_HTML_FORM, Auth_OpenID_ENCODE_KVFORM, Auth_OpenID_ENCODE_URL, Auth_OpenID_OPENID1_URL_LIMIT, Auth_OpenID_OPENID_NS, encodeToURL(), and hasReturnTo().

{
if ($this->hasReturnTo()) {
if ($this->message->isOpenID2() &&
(strlen($this->encodeToURL()) >
} else {
}
}
if (!$this->message) {
return null;
}
$mode = $this->message->getArg(Auth_OpenID_OPENID_NS,
'mode');
if ($mode) {
if (!in_array($mode, $_Auth_OpenID_Request_Modes)) {
}
}
return null;
}

+ Here is the call graph for this function:


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