_Auth---OpenID---SReg.php.html 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <!-- template designed by Marco Von Ballmoos -->
  6. <title>Docs for page SReg.php</title>
  7. <link rel="stylesheet" href="../media/stylesheet.css" />
  8. <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
  9. </head>
  10. <body>
  11. <div class="page-body">
  12. <h2 class="file-name">/Auth/OpenID/SReg.php</h2>
  13. <a name="sec-description"></a>
  14. <div class="info-box">
  15. <div class="info-box-title">Description</div>
  16. <div class="nav-bar">
  17. <span class="disabled">Description</span> |
  18. <a href="#sec-classes">Classes</a>
  19. | <a href="#sec-includes">Includes</a>
  20. | <a href="#sec-constants">Constants</a>
  21. | <a href="#sec-functions">Functions</a>
  22. </div>
  23. <div class="info-box-body">
  24. <!-- ========== Info from phpDoc block ========= -->
  25. <p class="short-description">Simple registration request and response parsing and object representation.</p>
  26. <p class="description"><p>This module contains objects representing simple registration requests and responses that can be used with both OpenID relying parties and OpenID providers.</p><p><ol><li>The relying party creates a request object and adds it to the
  27. <a href="../OpenID/Auth_OpenID_AuthRequest.html">Auth_OpenID_AuthRequest</a> object before making the</li></ol> checkid request to the OpenID provider:</p><p>$sreg_req = Auth_OpenID_SRegRequest::build(array('email')); $auth_request-&gt;addExtension($sreg_req);</p><p>2. The OpenID provider extracts the simple registration request from the OpenID request using Auth_OpenID_SRegRequest::fromOpenIDRequest, gets the user's approval and data, creates an <a href="../OpenID/Auth_OpenID_SRegResponse.html">Auth_OpenID_SRegResponse</a> object and adds it to the id_res response:</p><p>$sreg_req = Auth_OpenID_SRegRequest::fromOpenIDRequest( $checkid_request); // [ get the user's approval and data, informing the user that // the fields in sreg_response were requested ] $sreg_resp = Auth_OpenID_SRegResponse::extractResponse( $sreg_req, $user_data); $sreg_resp-&gt;toMessage($openid_response-&gt;fields);</p><p>3. The relying party uses Auth_OpenID_SRegResponse::fromSuccessResponse to extract the data from the OpenID response:</p><p>$sreg_resp = Auth_OpenID_SRegResponse::fromSuccessResponse( $success_response);</p></p>
  28. </div>
  29. </div>
  30. <a name="sec-classes"></a>
  31. <div class="info-box">
  32. <div class="info-box-title">Classes</div>
  33. <div class="nav-bar">
  34. <a href="#sec-description">Description</a> |
  35. <span class="disabled">Classes</span>
  36. | <a href="#sec-includes">Includes</a>
  37. | <a href="#sec-constants">Constants</a>
  38. | <a href="#sec-functions">Functions</a>
  39. </div>
  40. <div class="info-box-body">
  41. <table cellpadding="2" cellspacing="0" class="class-table">
  42. <tr>
  43. <th class="class-table-header">Class</th>
  44. <th class="class-table-header">Description</th>
  45. </tr>
  46. <tr>
  47. <td style="padding-right: 2em; vertical-align: top">
  48. <a href="../OpenID/Auth_OpenID_SRegBase.html">Auth_OpenID_SRegBase</a>
  49. </td>
  50. <td>
  51. A base class for classes dealing with Simple Registration protocol messages.
  52. </td>
  53. </tr>
  54. <tr>
  55. <td style="padding-right: 2em; vertical-align: top">
  56. <a href="../OpenID/Auth_OpenID_SRegRequest.html">Auth_OpenID_SRegRequest</a>
  57. </td>
  58. <td>
  59. An object to hold the state of a simple registration request.
  60. </td>
  61. </tr>
  62. <tr>
  63. <td style="padding-right: 2em; vertical-align: top">
  64. <a href="../OpenID/Auth_OpenID_SRegResponse.html">Auth_OpenID_SRegResponse</a>
  65. </td>
  66. <td>
  67. Represents the data returned in a simple registration response inside of an OpenID C{id_res} response. This object will be created by the OpenID server, added to the C{id_res} response object, and then extracted from the C{id_res} message by the Consumer.
  68. </td>
  69. </tr>
  70. </table>
  71. </div>
  72. </div>
  73. <a name="sec-includes"></a>
  74. <div class="info-box">
  75. <div class="info-box-title">Includes</div>
  76. <div class="nav-bar">
  77. <a href="#sec-description">Description</a> |
  78. <a href="#sec-classes">Classes</a>
  79. | <span class="disabled">Includes</span>
  80. | <a href="#sec-constants">Constants</a>
  81. | <a href="#sec-functions">Functions</a>
  82. </div>
  83. <div class="info-box-body">
  84. <a name="_Auth/OpenID/Message_php"><!-- --></a>
  85. <div class="evenrow">
  86. <div>
  87. <span class="include-title">
  88. <span class="include-type">require_once</span>
  89. (<span class="include-name"><a href="../OpenID/_Auth---OpenID---Message.php.html">'Auth/OpenID/Message.php'</a></span>)
  90. (line <span class="line-number">45</span>)
  91. </span>
  92. </div>
  93. <!-- ========== Info from phpDoc block ========= -->
  94. <p class="short-description">Import message and extension internals.</p>
  95. </div>
  96. <a name="_Auth/OpenID/Extension_php"><!-- --></a>
  97. <div class="oddrow">
  98. <div>
  99. <span class="include-title">
  100. <span class="include-type">require_once</span>
  101. (<span class="include-name"><a href="../OpenID/_Auth---OpenID---Extension.php.html">'Auth/OpenID/Extension.php'</a></span>)
  102. (line <span class="line-number">46</span>)
  103. </span>
  104. </div>
  105. <!-- ========== Info from phpDoc block ========= -->
  106. </div>
  107. </div>
  108. </div>
  109. <a name="sec-constants"></a>
  110. <div class="info-box">
  111. <div class="info-box-title">Constants</div>
  112. <div class="nav-bar">
  113. <a href="#sec-description">Description</a> |
  114. <a href="#sec-classes">Classes</a>
  115. | <a href="#sec-includes">Includes</a>
  116. | <span class="disabled">Constants</span>
  117. | <a href="#sec-functions">Functions</a>
  118. </div>
  119. <div class="info-box-body">
  120. <a name="defineAuth_OpenID_SREG_NS_URI"><!-- --></a>
  121. <div class="evenrow">
  122. <div>
  123. <span class="const-title">
  124. <span class="const-name">Auth_OpenID_SREG_NS_URI</span> = Auth_OpenID_SREG_NS_URI_1_1
  125. (line <span class="line-number">86</span>)
  126. </span>
  127. </div>
  128. <!-- ========== Info from phpDoc block ========= -->
  129. </div>
  130. <a name="defineAuth_OpenID_SREG_NS_URI_1_0"><!-- --></a>
  131. <div class="oddrow">
  132. <div>
  133. <span class="const-title">
  134. <span class="const-name">Auth_OpenID_SREG_NS_URI_1_0</span> = 'http://openid.net/sreg/1.0'
  135. (line <span class="line-number">77</span>)
  136. </span>
  137. </div>
  138. <!-- ========== Info from phpDoc block ========= -->
  139. </div>
  140. <a name="defineAuth_OpenID_SREG_NS_URI_1_1"><!-- --></a>
  141. <div class="evenrow">
  142. <div>
  143. <span class="const-title">
  144. <span class="const-name">Auth_OpenID_SREG_NS_URI_1_1</span> = 'http://openid.net/extensions/sreg/1.1'
  145. (line <span class="line-number">81</span>)
  146. </span>
  147. </div>
  148. <!-- ========== Info from phpDoc block ========= -->
  149. </div>
  150. </div>
  151. </div>
  152. <a name="sec-functions"></a>
  153. <div class="info-box">
  154. <div class="info-box-title">Functions</div>
  155. <div class="nav-bar">
  156. <a href="#sec-description">Description</a> |
  157. <a href="#sec-classes">Classes</a>
  158. | <a href="#sec-includes">Includes</a>
  159. | <a href="#sec-constants">Constants</a>
  160. | <span class="disabled">Functions</span>
  161. </div>
  162. <div class="info-box-body">
  163. <a name="functionAuth_OpenID_checkFieldName" id="functionAuth_OpenID_checkFieldName"><!-- --></a>
  164. <div class="oddrow">
  165. <div>
  166. <span class="method-title">Auth_OpenID_checkFieldName</span> (line <span class="line-number">65</span>)
  167. </div>
  168. <!-- ========== Info from phpDoc block ========= -->
  169. <p class="short-description">Check to see that the given value is a valid simple registration data field name. Return true if so, false if not.</p>
  170. <div class="method-signature">
  171. <span class="method-result">void</span>
  172. <span class="method-name">
  173. Auth_OpenID_checkFieldName
  174. </span>
  175. (<span class="var-type"></span>&nbsp;<span class="var-name">$field_name</span>)
  176. </div>
  177. <ul class="parameters">
  178. <li>
  179. <span class="var-type"></span>
  180. <span class="var-name">$field_name</span> </li>
  181. </ul>
  182. </div>
  183. <a name="functionAuth_OpenID_supportsSReg" id="functionAuth_OpenID_supportsSReg"><!-- --></a>
  184. <div class="evenrow">
  185. <div>
  186. <span class="method-title">Auth_OpenID_supportsSReg</span> (line <span class="line-number">97</span>)
  187. </div>
  188. <!-- ========== Info from phpDoc block ========= -->
  189. <p class="short-description">Does the given endpoint advertise support for simple registration?</p>
  190. <p class="description"><p>$endpoint: The endpoint object as returned by OpenID discovery. returns whether an sreg type was advertised by the endpoint</p></p>
  191. <div class="method-signature">
  192. <span class="method-result">void</span>
  193. <span class="method-name">
  194. Auth_OpenID_supportsSReg
  195. </span>
  196. (<span class="var-type"></span>&nbsp;<span class="var-name">&$endpoint</span>)
  197. </div>
  198. <ul class="parameters">
  199. <li>
  200. <span class="var-type"></span>
  201. <span class="var-name">&$endpoint</span> </li>
  202. </ul>
  203. </div>
  204. </div>
  205. </div>
  206. <p class="notes" id="credit">
  207. Documentation generated on Tue, 21 Apr 2009 11:31:33 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
  208. </p>
  209. </div></body>
  210. </html>