File: Auth_OpenID_SessionNegotiator.html

package info (click to toggle)
php-openid 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,284 kB
  • ctags: 6,733
  • sloc: php: 20,482; python: 346; xml: 333; sh: 130; perl: 103; makefile: 31
file content (165 lines) | stat: -rw-r--r-- 7,400 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Auth_OpenID_SessionNegotiator</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			

<h2 class="class-name">Class Auth_OpenID_SessionNegotiator</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<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>
<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>
		<p class="notes">
			Located in <a class="field" href="_Auth---OpenID---Association.php.html">/Auth/OpenID/Association.php</a> (line <span class="field">518</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																						
				<div class="method-definition">
											<span class="method-result">Auth_OpenID_SessionNegotiator</span>
										<a href="#Auth_OpenID_SessionNegotiator" title="details" class="method-name">Auth_OpenID_SessionNegotiator</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$allowed_types</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getAllowedType" title="details" class="method-name">getAllowedType</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#isAllowed" title="details" class="method-name">isAllowed</a>
											(<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>)
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodAuth_OpenID_SessionNegotiator" id="Auth_OpenID_SessionNegotiator"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor Auth_OpenID_SessionNegotiator</span> (line <span class="line-number">519</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">Auth_OpenID_SessionNegotiator</span>
		<span class="method-name">
			Auth_OpenID_SessionNegotiator
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$allowed_types</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$allowed_types</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetAllowedType" id="getAllowedType"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getAllowedType</span> (line <span class="line-number">594</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get a pair of assocation type and session type that are  supported.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getAllowedType
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodisAllowed" id="isAllowed"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">isAllowed</span> (line <span class="line-number">579</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			isAllowed
		</span>
					(<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>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$assoc_type</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$session_type</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 05 Dec 2007 14:02:10 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
	</p>
	</div></body>
</html>