File: Auth_OpenID_DumbStore.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 (319 lines) | stat: -rw-r--r-- 14,385 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<?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_DumbStore</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_DumbStore</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">This is a store for use in the worst case, when you have no way of  saving state on the consumer site. Using this store makes the  consumer vulnerable to replay attacks, as it's unable to use  nonces. Avoid using this store if it is at all possible.</p>
<p class="description"><p>Most of the methods of this class are implementation details.  Users of this class need to worry only about the constructor.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> JanRain, Inc. &lt;<a href="mailto:openid@janrain.com">openid@janrain.com</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Auth---OpenID---DumbStore.php.html">/Auth/OpenID/DumbStore.php</a> (line <span class="field">34</span>)
		</p>
		
				
		<pre><a href="../OpenID/Auth_OpenID_OpenIDStore.html">Auth_OpenID_OpenIDStore</a>
   |
   --Auth_OpenID_DumbStore</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_DumbStore</span>
										<a href="#Auth_OpenID_DumbStore" title="details" class="method-name">Auth_OpenID_DumbStore</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$secret_phrase</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getAssociation" title="details" class="method-name">getAssociation</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$handle</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getAuthKey" title="details" class="method-name">getAuthKey</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#removeAssociation" title="details" class="method-name">removeAssociation</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$handle</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#storeAssociation" title="details" class="method-name">storeAssociation</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$association</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#useNonce" title="details" class="method-name">useNonce</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$timestamp</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$salt</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_DumbStore" id="Auth_OpenID_DumbStore"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor Auth_OpenID_DumbStore</span> (line <span class="line-number">53</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Creates a new <a href="../OpenID/Auth_OpenID_DumbStore.html">Auth_OpenID_DumbStore</a> instance. For the security  of the tokens generated by the library, this class attempts to  at least have a secure implementation of getAuthKey.</p>
<p class="description"><p>When you create an instance of this class, pass in a secret  phrase. The phrase is hashed with sha1 to make it the correct  length and form for an auth key. That allows you to use a long  string as the secret phrase, which means you can make it very  difficult to guess.</p><p>Each <a href="../OpenID/Auth_OpenID_DumbStore.html">Auth_OpenID_DumbStore</a> instance that is created for use by  your consumer site needs to use the same $secret_phrase.</p></p>
	
	<div class="method-signature">
		<span class="method-result">Auth_OpenID_DumbStore</span>
		<span class="method-name">
			Auth_OpenID_DumbStore
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$secret_phrase</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$secret_phrase</span><span class="var-description">: secret_phrase The phrase used to create the auth  key returned by getAuthKey</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetAssociation" id="getAssociation"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getAssociation</span> (line <span class="line-number">68</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This implementation always returns null.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getAssociation
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$handle</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$server_url</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$handle</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodgetAssociation">Auth_OpenID_OpenIDStore::getAssociation()</a></dt>
						<dd>This method returns an Association object from storage that  matches the server URL and, if specified, handle. It returns  null if no such association is found or if the matching  association is expired.</dd>
					</dl>
			
	</div>
<a name="methodgetAuthKey" id="getAuthKey"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getAuthKey</span> (line <span class="line-number">94</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method returns the auth key generated by the constructor.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getAuthKey
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodremoveAssociation" id="removeAssociation"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">removeAssociation</span> (line <span class="line-number">76</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This implementation always returns false.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			removeAssociation
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$handle</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$server_url</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$handle</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodremoveAssociation">Auth_OpenID_OpenIDStore::removeAssociation()</a></dt>
						<dd>This method removes the matching association if it's found, and  returns whether the association was removed or not.</dd>
					</dl>
			
	</div>
<a name="methodstoreAssociation" id="storeAssociation"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">storeAssociation</span> (line <span class="line-number">61</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This implementation does nothing.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			storeAssociation
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$association</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$server_url</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$association</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodstoreAssociation">Auth_OpenID_OpenIDStore::storeAssociation()</a></dt>
						<dd>This method puts an Association object into storage,  retrievable by server URL and handle.</dd>
					</dl>
			
	</div>
<a name="methoduseNonce" id="useNonce"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">useNonce</span> (line <span class="line-number">86</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">In a system truly limited to dumb mode, nonces must all be  accepted. This therefore always returns true, which makes  replay attacks feasible.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			useNonce
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$timestamp</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$salt</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$server_url</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$timestamp</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$salt</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methoduseNonce">Auth_OpenID_OpenIDStore::useNonce()</a></dt>
						<dd>Called when using a nonce.</dd>
					</dl>
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../OpenID/Auth_OpenID_OpenIDStore.html">Auth_OpenID_OpenIDStore</a></span></p>
					<blockquote>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodcleanup">Auth_OpenID_OpenIDStore::cleanup()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodcleanupAssociations">Auth_OpenID_OpenIDStore::cleanupAssociations()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodcleanupNonces">Auth_OpenID_OpenIDStore::cleanupNonces()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodgetAssociation">Auth_OpenID_OpenIDStore::getAssociation()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodremoveAssociation">Auth_OpenID_OpenIDStore::removeAssociation()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodreset">Auth_OpenID_OpenIDStore::reset()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodstoreAssociation">Auth_OpenID_OpenIDStore::storeAssociation()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methoduseNonce">Auth_OpenID_OpenIDStore::useNonce()</a></span><br>
											</blockquote>
										
		</div>
	</div>


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