Auth_OpenID_SessionNegotiator.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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 Class Auth_OpenID_SessionNegotiator</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="class-name">Class Auth_OpenID_SessionNegotiator</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-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
  19. </div>
  20. <div class="info-box-body">
  21. <!-- ========== Info from phpDoc block ========= -->
  22. <p class="short-description">A session negotiator controls the allowed and preferred association types and association session types. Both the <a href="../OpenID/Auth_OpenID_Consumer.html">Auth_OpenID_Consumer</a> and <a href="../OpenID/Auth_OpenID_Server.html">Auth_OpenID_Server</a> use negotiators when creating associations.</p>
  23. <p class="description"><p>You can create and use negotiators if you: <ul><li>Do not want to do Diffie-Hellman key exchange because you use</li></ul> transport-layer encryption (e.g. SSL)</p><p><ul><li>Want to use only SHA-256 associations</li></ul> <ul><li>Do not want to support plain-text associations over a non-secure</li></ul> channel</p><p>It is up to you to set a policy for what kinds of associations to accept. By default, the library will make any kind of association that is allowed in the OpenID 2.0 specification.</p><p>Use of negotiators in the library =================================</p><p>When a consumer makes an association request, it calls <a href="../OpenID/Auth_OpenID_SessionNegotiator.html#methodgetAllowedType">getAllowedType</a> to get the preferred association type and association session type.</p><p>The server gets a request for a particular association/session type and calls <a href="../OpenID/Auth_OpenID_SessionNegotiator.html#methodisAllowed">isAllowed</a> to determine if it should create an association. If it is supported, negotiation is complete. If it is not, the server calls <a href="../OpenID/Auth_OpenID_SessionNegotiator.html#methodgetAllowedType">getAllowedType</a> to get an allowed association type to return to the consumer.</p><p>If the consumer gets an error response indicating that the requested association/session type is not supported by the server that contains an assocation/session type to try, it calls <a href="../OpenID/Auth_OpenID_SessionNegotiator.html#methodisAllowed">isAllowed</a> to determine if it should try again with the given combination of association/session type.</p></p>
  24. <p class="notes">
  25. Located in <a class="field" href="_Auth---OpenID---Association.php.html">/Auth/OpenID/Association.php</a> (line <span class="field">527</span>)
  26. </p>
  27. <pre></pre>
  28. </div>
  29. </div>
  30. <a name="sec-method-summary"></a>
  31. <div class="info-box">
  32. <div class="info-box-title">Method Summary</span></div>
  33. <div class="nav-bar">
  34. <a href="#sec-description">Description</a> |
  35. <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
  36. </div>
  37. <div class="info-box-body">
  38. <div class="method-summary">
  39. <div class="method-definition">
  40. <span class="method-result">Auth_OpenID_SessionNegotiator</span>
  41. <a href="#Auth_OpenID_SessionNegotiator" title="details" class="method-name">Auth_OpenID_SessionNegotiator</a>
  42. (<span class="var-type"></span>&nbsp;<span class="var-name">$allowed_types</span>)
  43. </div>
  44. <div class="method-definition">
  45. <span class="method-result">void</span>
  46. <a href="#getAllowedType" title="details" class="method-name">getAllowedType</a>
  47. ()
  48. </div>
  49. <div class="method-definition">
  50. <span class="method-result">void</span>
  51. <a href="#isAllowed" title="details" class="method-name">isAllowed</a>
  52. (<span class="var-type"></span>&nbsp;<span class="var-name">$assoc_type</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$session_type</span>)
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <a name="sec-methods"></a>
  58. <div class="info-box">
  59. <div class="info-box-title">Methods</div>
  60. <div class="nav-bar">
  61. <a href="#sec-description">Description</a> |
  62. <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
  63. </div>
  64. <div class="info-box-body">
  65. <A NAME='method_detail'></A>
  66. <a name="methodAuth_OpenID_SessionNegotiator" id="Auth_OpenID_SessionNegotiator"><!-- --></a>
  67. <div class="evenrow">
  68. <div class="method-header">
  69. <span class="method-title">Constructor Auth_OpenID_SessionNegotiator</span> (line <span class="line-number">528</span>)
  70. </div>
  71. <!-- ========== Info from phpDoc block ========= -->
  72. <div class="method-signature">
  73. <span class="method-result">Auth_OpenID_SessionNegotiator</span>
  74. <span class="method-name">
  75. Auth_OpenID_SessionNegotiator
  76. </span>
  77. (<span class="var-type"></span>&nbsp;<span class="var-name">$allowed_types</span>)
  78. </div>
  79. <ul class="parameters">
  80. <li>
  81. <span class="var-type"></span>
  82. <span class="var-name">$allowed_types</span> </li>
  83. </ul>
  84. </div>
  85. <a name="methodgetAllowedType" id="getAllowedType"><!-- --></a>
  86. <div class="oddrow">
  87. <div class="method-header">
  88. <span class="method-title">getAllowedType</span> (line <span class="line-number">603</span>)
  89. </div>
  90. <!-- ========== Info from phpDoc block ========= -->
  91. <p class="short-description">Get a pair of assocation type and session type that are supported.</p>
  92. <div class="method-signature">
  93. <span class="method-result">void</span>
  94. <span class="method-name">
  95. getAllowedType
  96. </span>
  97. ()
  98. </div>
  99. </div>
  100. <a name="methodisAllowed" id="isAllowed"><!-- --></a>
  101. <div class="evenrow">
  102. <div class="method-header">
  103. <span class="method-title">isAllowed</span> (line <span class="line-number">588</span>)
  104. </div>
  105. <!-- ========== Info from phpDoc block ========= -->
  106. <div class="method-signature">
  107. <span class="method-result">void</span>
  108. <span class="method-name">
  109. isAllowed
  110. </span>
  111. (<span class="var-type"></span>&nbsp;<span class="var-name">$assoc_type</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$session_type</span>)
  112. </div>
  113. <ul class="parameters">
  114. <li>
  115. <span class="var-type"></span>
  116. <span class="var-name">$assoc_type</span> </li>
  117. <li>
  118. <span class="var-type"></span>
  119. <span class="var-name">$session_type</span> </li>
  120. </ul>
  121. </div>
  122. </div>
  123. </div>
  124. <p class="notes" id="credit">
  125. Documentation generated on Tue, 21 Apr 2009 11:31:29 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
  126. </p>
  127. </div></body>
  128. </html>