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 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>openid.consumer.consumer.AuthRequest</title>
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="openid-module.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
<a class="navbar" target="_top" href="http://openidenabled.com/python-openid/">Python-OpenID</a>
</p></th></tr></table>
</th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<font size="-1"><b class="breadcrumbs">
<a href="openid-module.html">Package openid</a> ::
<a href="openid.consumer-module.html">Package consumer</a> ::
<a href="openid.consumer.consumer-module.html">Module consumer</a> ::
Class AuthRequest
</b></font></br>
</td>
<td><table cellpadding="0" cellspacing="0">
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="openid.consumer.consumer.AuthRequest-class.html" target="_top">no frames</a>]</font></td></tr>
</table></td>
</tr></table>
<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Type AuthRequest</h2>
<pre class="base-tree">
<a href="__builtin__.object-class.html"><code>object</code></a> --+
|
<b>AuthRequest</b>
</pre><br />
<hr/>
<p>An object that holds the state necessary for generating an OpenID
authentication request. This object holds the association with the server
and the discovered information with which the request will be made.</p>
It is separate from the consumer because you may wish to add things to
the request before sending it on its way to the server. It also has
serialization options that let you encode the authentication request as a
URL or as a form POST.
<hr/>
<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>endpoint</span>,
<span class=summary-sig-arg>assoc</span>)</span></code>
<br />
Creates a new AuthRequest object.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#addExtension" class="summary-sig-name"><code>addExtension</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>extension_request</span>)</span></code>
<br />
Add an extension to this checkid request.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#addExtensionArg" class="summary-sig-name"><code>addExtensionArg</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>namespace</span>,
<span class=summary-sig-arg>key</span>,
<span class=summary-sig-arg>value</span>)</span></code>
<br />
Add an extension argument to this OpenID authentication request.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#formMarkup" class="summary-sig-name"><code>formMarkup</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>realm</span>,
<span class=summary-sig-arg>return_to</span>,
<span class=summary-sig-arg>immediate</span>,
<span class=summary-sig-arg>form_tag_attrs</span>)</span></code>
<br />
Get html for a form to submit this request to the IDP.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> <a href="openid.message.Message-class.html"
class="link"><code>openid.message.Message</code></a>
</font></td>
<td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#getMessage" class="summary-sig-name"><code>getMessage</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>realm</span>,
<span class=summary-sig-arg>return_to</span>,
<span class=summary-sig-arg>immediate</span>)</span></code>
<br />
Produce a <a href="openid.message.Message-class.html"
class="link"><code>openid.message.Message</code></a> representing this
request.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#htmlMarkup" class="summary-sig-name"><code>htmlMarkup</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>realm</span>,
<span class=summary-sig-arg>return_to</span>,
<span class=summary-sig-arg>immediate</span>,
<span class=summary-sig-arg>form_tag_attrs</span>)</span></code>
<br />
Get an autosubmitting HTML page that submits this request to the
IDP.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> str
</font></td>
<td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#redirectURL" class="summary-sig-name"><code>redirectURL</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>realm</span>,
<span class=summary-sig-arg>return_to</span>,
<span class=summary-sig-arg>immediate</span>)</span></code>
<br />
Returns a URL with an encoded OpenID request.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#setAnonymous" class="summary-sig-name"><code>setAnonymous</code></a>(<span class=summary-sig-arg>self</span>,
<span class=summary-sig-arg>is_anonymous</span>)</span></code>
<br />
Set whether this request should be made anonymously.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> bool
</font></td>
<td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#shouldSendRedirect" class="summary-sig-name"><code>shouldSendRedirect</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Should this OpenID authentication request be sent as a HTTP redirect
or as a POST (form submission)?</td></tr>
<tr><td colspan="2">
<b>Inherited from <a href="__builtin__.object-class.html"><code>object</code></a>:</b>
<a href="__builtin__.object-class.html#__delattr__"><code>__delattr__</code></a>,
<a href="__builtin__.object-class.html#__getattribute__"><code>__getattribute__</code></a>,
<a href="__builtin__.object-class.html#__hash__"><code>__hash__</code></a>,
<a href="__builtin__.object-class.html#__new__"><code>__new__</code></a>,
<a href="__builtin__.object-class.html#__reduce__"><code>__reduce__</code></a>,
<a href="__builtin__.object-class.html#__reduce_ex__"><code>__reduce_ex__</code></a>,
<a href="__builtin__.object-class.html#__repr__"><code>__repr__</code></a>,
<a href="__builtin__.object-class.html#__setattr__"><code>__setattr__</code></a>,
<a href="__builtin__.object-class.html#__str__"><code>__str__</code></a>
</td></tr>
</table><br />
<!-- =========== START OF METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
<th colspan="2">Method Details</th></tr>
</table>
<a name="__init__"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>endpoint</span>,
<span class=sig-arg>assoc</span>)</span>
<br /><i>(Constructor)</i>
</h3>
<p>Creates a new AuthRequest object. This just stores each argument in
an appropriately named field.</p>
Users of this library should not create instances of this class.
Instances of this class are created by the library when needed.
<dl><dt></dt><dd>
<dl><dt><b>Overrides:</b></dt>
<dd><a href="__builtin__.object-class.html#__init__"><code>__builtin__.object.__init__</code></a></dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="addExtension"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">addExtension</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>extension_request</span>)</span>
</h3>
Add an extension to this checkid request.
<dl><dt></dt><dd>
<dl><dt><b>Parameters:</b></dt>
<dd><code><b>extension_request</b></code> -
An object that implements the extension interface for adding
arguments to an OpenID message.
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="addExtensionArg"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">addExtensionArg</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>namespace</span>,
<span class=sig-arg>key</span>,
<span class=sig-arg>value</span>)</span>
</h3>
<p>Add an extension argument to this OpenID authentication request.</p>
Use caution when adding arguments, because they will be URL-escaped
and appended to the redirect URL, which can easily get quite long.
<dl><dt></dt><dd>
<dl><dt><b>Parameters:</b></dt>
<dd><code><b>namespace</b></code> -
The namespace for the extension. For example, the simple
registration extension uses the namespace <code>sreg</code>.
<br /><i>
(type=str)</i>
<dd><code><b>key</b></code> -
The key within the extension namespace. For example, the
nickname field in the simple registration extension's key is
<code>nickname</code>.
<br /><i>
(type=str)</i>
<dd><code><b>value</b></code> -
The value to provide to the server for this argument.
<br /><i>
(type=str)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="formMarkup"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">formMarkup</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>realm</span>,
<span class=sig-arg>return_to</span>=<span class=sig-default>None</span>,
<span class=sig-arg>immediate</span>=<span class=sig-default>False</span>,
<span class=sig-arg>form_tag_attrs</span>=<span class=sig-default>None</span>)</span>
</h3>
Get html for a form to submit this request to the IDP.
<dl><dt></dt><dd>
<dl><dt><b>Parameters:</b></dt>
<dd><code><b>form_tag_attrs</b></code> -
Dictionary of attributes to be added to the form tag.
'accept-charset' and 'enctype' have defaults that can be
overridden. If a value is supplied for 'action' or 'method', it
will be replaced.
<br /><i>
(type={unicode: unicode})</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="getMessage"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">getMessage</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>realm</span>,
<span class=sig-arg>return_to</span>=<span class=sig-default>None</span>,
<span class=sig-arg>immediate</span>=<span class=sig-default>False</span>)</span>
</h3>
Produce a <a href="openid.message.Message-class.html"
class="link"><code>openid.message.Message</code></a> representing this
request.
<dl><dt></dt><dd>
<dl><dt><b>Parameters:</b></dt>
<dd><code><b>realm</b></code> -
The URL (or URL pattern) that identifies your web site to the
user when she is authorizing it.
<br /><i>
(type=str)</i>
<dd><code><b>return_to</b></code> -
<p>The URL that the OpenID provider will send the user back to
after attempting to verify her identity.</p>
Not specifying a return_to URL means that the user will not be
returned to the site issuing the request upon its completion.
<br /><i>
(type=str)</i>
<dd><code><b>immediate</b></code> -
If True, the OpenID provider is to send back a response
immediately, useful for behind-the-scenes authentication
attempts. Otherwise the OpenID provider may engage the user
before providing a response. This is the default case, as the
user may need to provide credentials or approve the request
before a positive response can be sent.
<br /><i>
(type=bool)</i>
</dd>
</dl>
<dl><dt><b>Returns:</b></dt>
<dd>
<a href="openid.message.Message-class.html"
class="link"><code>openid.message.Message</code></a>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="htmlMarkup"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">htmlMarkup</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>realm</span>,
<span class=sig-arg>return_to</span>=<span class=sig-default>None</span>,
<span class=sig-arg>immediate</span>=<span class=sig-default>False</span>,
<span class=sig-arg>form_tag_attrs</span>=<span class=sig-default>None</span>)</span>
</h3>
Get an autosubmitting HTML page that submits this request to the
IDP. This is just a wrapper for formMarkup.
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
str
</dd>
</dl>
<p><b>See Also:</b> formMarkup
</p>
</dd></dl>
</td></tr></table>
<a name="redirectURL"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">redirectURL</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>realm</span>,
<span class=sig-arg>return_to</span>=<span class=sig-default>None</span>,
<span class=sig-arg>immediate</span>=<span class=sig-default>False</span>)</span>
</h3>
<p>Returns a URL with an encoded OpenID request.</p>
<p>The resulting URL is the OpenID provider's endpoint URL with
parameters appended as query arguments. You should redirect the user
agent to this URL.</p>
OpenID 2.0 endpoints also accept POST requests, see <code><a
href="openid.consumer.consumer.AuthRequest-class.html#shouldSendRedirect"
class="link"><code>shouldSendRedirect</code></a></code> and <code><a
href="openid.consumer.consumer.AuthRequest-class.html#formMarkup"
class="link"><code>formMarkup</code></a></code>.
<dl><dt></dt><dd>
<dl><dt><b>Parameters:</b></dt>
<dd><code><b>realm</b></code> -
The URL (or URL pattern) that identifies your web site to the
user when she is authorizing it.
<br /><i>
(type=str)</i>
<dd><code><b>return_to</b></code> -
<p>The URL that the OpenID provider will send the user back to
after attempting to verify her identity.</p>
Not specifying a return_to URL means that the user will not be
returned to the site issuing the request upon its completion.
<br /><i>
(type=str)</i>
<dd><code><b>immediate</b></code> -
If True, the OpenID provider is to send back a response
immediately, useful for behind-the-scenes authentication
attempts. Otherwise the OpenID provider may engage the user
before providing a response. This is the default case, as the
user may need to provide credentials or approve the request
before a positive response can be sent.
<br /><i>
(type=bool)</i>
</dd>
</dl>
<dl><dt><b>Returns:</b></dt>
<dd>
The URL to redirect the user agent to.
<br /><i>
(type=str)</i>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a name="setAnonymous"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">setAnonymous</span>(<span class=sig-arg>self</span>,
<span class=sig-arg>is_anonymous</span>)</span>
</h3>
<p>Set whether this request should be made anonymously. If a request is
anonymous, the identifier will not be sent in the request. This is only
useful if you are making another kind of request with an extension in
this request.</p>
Anonymous requests are not allowed when the request is made with
OpenID 1.
<dl><dt></dt><dd>
<dl><dt><b>Raises:</b></dt>
<dd><code><b>ValueError</b></code> -
when attempting to set an OpenID1 request as anonymous
</dl>
</dd></dl>
</td></tr></table>
<a name="shouldSendRedirect"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">shouldSendRedirect</span>(<span class=sig-arg>self</span>)</span>
</h3>
Should this OpenID authentication request be sent as a HTTP redirect
or as a POST (form submission)?
<dl><dt></dt><dd>
<dl><dt><b>Returns:</b></dt>
<dd>
bool
</dd>
</dl>
</dd></dl>
</td></tr></table>
<br />
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="openid-module.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
<a class="navbar" target="_top" href="http://openidenabled.com/python-openid/">Python-OpenID</a>
</p></th></tr></table>
</th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Wed Apr 22 16:14:20 2009</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
</table>
</body>
</html>
|