ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
Auth_OpenID_Server Class Reference
+ Collaboration diagram for Auth_OpenID_Server:

Public Member Functions

 Auth_OpenID_Server ($store, $op_endpoint=null)
 
 handleRequest ($request)
 Handle a request. More...
 
 openid_check_authentication ($request)
 The callback for 'check_authentication' messages. More...
 
 openid_associate ($request)
 The callback for 'associate' messages. More...
 
 encodeResponse ($response)
 Encodes as response in the appropriate format suitable for sending to the user agent. More...
 
 decodeRequest ($query=null)
 Decodes a query args array into the appropriate Auth_OpenID_Request object. More...
 

Detailed Description

Definition at line 1681 of file Server.php.

Member Function Documentation

◆ Auth_OpenID_Server()

Auth_OpenID_Server::Auth_OpenID_Server (   $store,
  $op_endpoint = null 
)

Definition at line 1682 of file Server.php.

References Auth_OpenID_getDefaultNegotiator().

1683  {
1684  $this->store = $store;
1685  $this->signatory = new Auth_OpenID_Signatory($this->store);
1686  $this->encoder = new Auth_OpenID_SigningEncoder($this->signatory);
1687  $this->decoder = new Auth_OpenID_Decoder($this);
1688  $this->op_endpoint = $op_endpoint;
1689  $this->negotiator = Auth_OpenID_getDefaultNegotiator();
1690  }
Auth_OpenID_getDefaultNegotiator()
+ Here is the call graph for this function:

◆ decodeRequest()

Auth_OpenID_Server::decodeRequest (   $query = null)

Decodes a query args array into the appropriate Auth_OpenID_Request object.

Definition at line 1755 of file Server.php.

References $query, and Auth_OpenID\getQuery().

1756  {
1757  if ($query === null) {
1759  }
1760 
1761  return $this->decoder->decode($query);
1762  }
static getQuery($query_str=null)
Gets the query data from the server environment based on the request method used. ...
Definition: OpenID.php:142
+ Here is the call graph for this function:

◆ encodeResponse()

Auth_OpenID_Server::encodeResponse (   $response)

Encodes as response in the appropriate format suitable for sending to the user agent.

Definition at line 1746 of file Server.php.

1747  {
1748  return $this->encoder->encode($response);
1749  }

◆ handleRequest()

Auth_OpenID_Server::handleRequest (   $request)

Handle a request.

Given an Auth_OpenID_Request object, call the appropriate Auth_OpenID_Server method to process the request and generate a response.

Parameters
Auth_OpenID_Request$requestAn Auth_OpenID_Request returned by Auth_OpenID_Server::decodeRequest().
Returns
Auth_OpenID_ServerResponse $response A response object capable of generating a user-agent reply.

Definition at line 1703 of file Server.php.

1704  {
1705  if (method_exists($this, "openid_" . $request->mode)) {
1706  $handler = array($this, "openid_" . $request->mode);
1707  return call_user_func($handler, &$request);
1708  }
1709  return null;
1710  }

◆ openid_associate()

Auth_OpenID_Server::openid_associate (   $request)

The callback for 'associate' messages.

Definition at line 1723 of file Server.php.

1724  {
1725  $assoc_type = $request->assoc_type;
1726  $session_type = $request->session->session_type;
1727  if ($this->negotiator->isAllowed($assoc_type, $session_type)) {
1728  $assoc = $this->signatory->createAssociation(false,
1729  $assoc_type);
1730  return $request->answer($assoc);
1731  } else {
1732  $message = sprintf('Association type %s is not supported with '.
1733  'session type %s', $assoc_type, $session_type);
1734  list($preferred_assoc_type, $preferred_session_type) =
1735  $this->negotiator->getAllowedType();
1736  return $request->answerUnsupported($message,
1737  $preferred_assoc_type,
1738  $preferred_session_type);
1739  }
1740  }

◆ openid_check_authentication()

Auth_OpenID_Server::openid_check_authentication (   $request)

The callback for 'check_authentication' messages.

Definition at line 1715 of file Server.php.

1716  {
1717  return $request->answer($this->signatory);
1718  }

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