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 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896
|
<?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" xml:lang="en" lang="en">
<head>
<title>Class: OpenID::Consumer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">OpenID::Consumer</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/lib/openid/consumer/idres_rb.html">
lib/openid/consumer/idres.rb
</a>
<br />
<a href="../../files/lib/openid/consumer/associationmanager_rb.html">
lib/openid/consumer/associationmanager.rb
</a>
<br />
<a href="../../files/lib/openid/consumer/discovery_manager_rb.html">
lib/openid/consumer/discovery_manager.rb
</a>
<br />
<a href="../../files/lib/openid/consumer/checkid_request_rb.html">
lib/openid/consumer/checkid_request.rb
</a>
<br />
<a href="../../files/lib/openid/consumer/responses_rb.html">
lib/openid/consumer/responses.rb
</a>
<br />
<a href="../../files/lib/openid/consumer_rb.html">
lib/openid/consumer.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
<a href="../OpenID.html">OpenID</a> support for Relying Parties (aka
Consumers).
</p>
<p>
This module documents the main interface with the <a
href="../OpenID.html">OpenID</a> consumer library. The only part of the
library which has to be used and isn‘t documented in full here is the
store required to create an <a href="Consumer.html">Consumer</a> instance.
</p>
<h1>OVERVIEW</h1>
<p>
The <a href="../OpenID.html">OpenID</a> identity verification process most
commonly uses the following steps, as visible to the user of this library:
</p>
<ol>
<li>The user enters their <a href="../OpenID.html">OpenID</a> into a field on
the consumer‘s site, and hits a login button.
</li>
<li>The consumer site discovers the user‘s <a
href="../OpenID.html">OpenID</a> provider using the <a
href="Yadis.html">Yadis</a> protocol.
</li>
<li>The consumer site sends the browser a redirect to the <a
href="../OpenID.html">OpenID</a> provider. This is the authentication
request as described in the <a href="../OpenID.html">OpenID</a>
specification.
</li>
<li>The <a href="../OpenID.html">OpenID</a> provider‘s site sends the
browser a redirect back to the consumer site. This redirect contains the
provider‘s response to the authentication request.
</li>
</ol>
<p>
The most important part of the flow to note is the consumer‘s site
must handle two separate HTTP requests in order to perform the full
identity check.
</p>
<h1>LIBRARY DESIGN</h1>
<p>
This consumer library is designed with that flow in mind. The goal is to
make it as easy as possible to perform the above steps securely.
</p>
<p>
At a high level, there are two important parts in the consumer library. The
first important part is this module, which contains the interface to
actually use this library. The second is openid/store/interface.rb, which
describes the interface to use if you need to create a custom method for
storing the state this library needs to maintain between requests.
</p>
<p>
In general, the second part is less important for users of the library to
know about, as several implementations are provided which cover a wide
variety of situations in which consumers may use the library.
</p>
<p>
The <a href="Consumer.html">Consumer</a> class has methods corresponding to
the actions necessary in each of steps 2, 3, and 4 described in the
overview. Use of this library should be as easy as creating an <a
href="Consumer.html">Consumer</a> instance and calling the methods
appropriate for the action the site wants to take.
</p>
<p>
This library automatically detects which version of the <a
href="../OpenID.html">OpenID</a> protocol should be used for a transaction
and constructs the proper requests and responses. Users of this library do
not need to worry about supporting multiple protocol versions; the library
supports them implicitly. Depending on the version of the protocol in use,
the <a href="../OpenID.html">OpenID</a> transaction may be more secure. See
the <a href="../OpenID.html">OpenID</a> specifications for more
information.
</p>
<h1>SESSIONS, STORES, AND STATELESS MODE</h1>
<p>
The <a href="Consumer.html">Consumer</a> object keeps track of two types of
state:
</p>
<ol>
<li>State of the user‘s current authentication attempt. Things like the
identity URL, the list of endpoints discovered for that URL, and in case
where some endpoints are unreachable, the list of endpoints already tried.
This state needs to be held from <a
href="Consumer.html#M000302">Consumer.begin</a>() to <a
href="Consumer.html#M000304">Consumer.complete</a>(), but it is only
applicable to a single session with a single user agent, and at the end of
the authentication process (i.e. when an OP replies with either
<tt>id_res</tt>. or <tt>cancel</tt> it may be discarded.
</li>
<li>State of relationships with servers, i.e. shared secrets (associations)
with servers and nonces seen on signed messages. This information should
persist from one session to the next and should not be bound to a
particular user-agent.
</li>
</ol>
<p>
These two types of storage are reflected in the first two arguments of <a
href="Consumer.html">Consumer</a>‘s constructor, <tt>session</tt> and
<tt>store</tt>. <tt>session</tt> is a dict-like object and we hope your web
framework provides you with one of these bound to the user agent.
<tt>store</tt> is an instance of <a href="Store.html">Store</a>.
</p>
<p>
Since the store does hold secrets shared between your application and the
<a href="../OpenID.html">OpenID</a> provider, you should be careful about
how you use it in a shared hosting environment. If the filesystem or
database permissions of your web host allow strangers to read from them, do
not store your data there! If you have no safe place to store your data,
construct your consumer with nil for the store, and it will operate only in
stateless mode. Stateless mode may be slower, put more load on the <a
href="../OpenID.html">OpenID</a> provider, and trusts the provider to keep
you safe from replay attacks.
</p>
<p>
Several store implementation are provided, and the interface is fully
documented so that custom stores can be used as well. See the documentation
for the <a href="Consumer.html">Consumer</a> class for more information on
the interface for stores. The implementations that are provided allow the
consumer site to store the necessary data in several different ways,
including several SQL databases and normal files on disk.
</p>
<h1>IMMEDIATE MODE</h1>
<p>
In the flow described above, the user may need to confirm to the <a
href="../OpenID.html">OpenID</a> provider that it‘s ok to disclose
his or her identity. The provider may draw pages asking for information
from the user before it redirects the browser back to the consumer‘s
site. This is generally transparent to the consumer site, so it is
typically ignored as an implementation detail.
</p>
<p>
There can be times, however, where the consumer site wants to get a
response immediately. When this is the case, the consumer can put the
library in immediate mode. In immediate mode, there is an extra response
possible from the server, which is essentially the server reporting that it
doesn‘t have enough information to answer the question yet.
</p>
<h1>USING THIS LIBRARY</h1>
<p>
Integrating this library into an application is usually a relatively
straightforward process. The process should basically follow this plan:
</p>
<p>
Add an <a href="../OpenID.html">OpenID</a> login field somewhere on your
site. When an <a href="../OpenID.html">OpenID</a> is entered in that field
and the form is submitted, it should make a request to the your site which
includes that <a href="../OpenID.html">OpenID</a> URL.
</p>
<p>
First, the application should instantiate a <a
href="Consumer.html">Consumer</a> with a session for per-user state and
store for shared state using the store of choice.
</p>
<p>
Next, the application should call the <tt><a
href="Consumer.html#M000302">begin</a></tt> method of <a
href="Consumer.html">Consumer</a> instance. This method takes the <a
href="../OpenID.html">OpenID</a> URL as entered by the user. The <tt><a
href="Consumer.html#M000302">begin</a></tt> method returns a <a
href="Consumer/CheckIDRequest.html">CheckIDRequest</a> object.
</p>
<p>
Next, the application should call the redirect_url method on the <a
href="Consumer/CheckIDRequest.html">CheckIDRequest</a> object. The
parameter <tt>return_to</tt> is the URL that the <a
href="../OpenID.html">OpenID</a> server will send the user back to after
attempting to verify his or her identity. The <tt>realm</tt> parameter is
the URL (or URL pattern) that identifies your web site to the user when he
or she is authorizing it. Send a redirect to the resulting URL to the
user‘s browser.
</p>
<p>
That‘s the first half of the authentication process. The second half
of the process is done after the user‘s <a
href="../OpenID.html">OpenID</a> Provider sends the user‘s browser a
redirect back to your site to <a href="Consumer.html#M000304">complete</a>
their login.
</p>
<p>
When that happens, the user will contact your site at the URL given as the
<tt>return_to</tt> URL to the redirect_url call made above. The request
will have several query parameters added to the URL by the <a
href="../OpenID.html">OpenID</a> provider as the information necessary to
finish the request.
</p>
<p>
Get a <a href="Consumer.html">Consumer</a> instance with the same session
and store as before and call its <a
href="Consumer.html#M000304">complete</a>() method, passing in all the
received query arguments and URL currently being handled.
</p>
<p>
There are multiple possible return types possible from that method. These
indicate the whether or not the login was successful, and include any
additional information appropriate for their type.
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000315">association_manager</a>
<a href="#M000302">begin</a>
<a href="#M000303">begin_without_discovery</a>
<a href="#M000310">cleanup_last_requested_endpoint</a>
<a href="#M000312">cleanup_session</a>
<a href="#M000304">complete</a>
<a href="#M000318">complete_cancel</a>
<a href="#M000319">complete_error</a>
<a href="#M000321">complete_id_res</a>
<a href="#M000317">complete_invalid</a>
<a href="#M000320">complete_setup_needed</a>
<a href="#M000313">discover</a>
<a href="#M000311">discovery_manager</a>
<a href="#M000316">handle_idres</a>
<a href="#M000308">last_requested_endpoint</a>
<a href="#M000309">last_requested_endpoint=</a>
<a href="#M000314">negotiator</a>
<a href="#M000301">new</a>
<a href="#M000300">openid1_return_to_claimed_id_name</a>
<a href="#M000299">openid1_return_to_claimed_id_name=</a>
<a href="#M000298">openid1_return_to_nonce_name</a>
<a href="#M000297">openid1_return_to_nonce_name=</a>
<a href="#M000305">session_get</a>
<a href="#M000307">session_key</a>
<a href="#M000306">session_set</a>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
Module <a href="Consumer/Response.html" class="link">OpenID::Consumer::Response</a><br />
Class <a href="Consumer/AssociationManager.html" class="link">OpenID::Consumer::AssociationManager</a><br />
Class <a href="Consumer/CancelResponse.html" class="link">OpenID::Consumer::CancelResponse</a><br />
Class <a href="Consumer/CheckIDRequest.html" class="link">OpenID::Consumer::CheckIDRequest</a><br />
Class <a href="Consumer/DiffieHellmanSHA1Session.html" class="link">OpenID::Consumer::DiffieHellmanSHA1Session</a><br />
Class <a href="Consumer/DiffieHellmanSHA256Session.html" class="link">OpenID::Consumer::DiffieHellmanSHA256Session</a><br />
Class <a href="Consumer/DiffieHellmanSession.html" class="link">OpenID::Consumer::DiffieHellmanSession</a><br />
Class <a href="Consumer/DiscoveredServices.html" class="link">OpenID::Consumer::DiscoveredServices</a><br />
Class <a href="Consumer/DiscoveryManager.html" class="link">OpenID::Consumer::DiscoveryManager</a><br />
Class <a href="Consumer/FailureResponse.html" class="link">OpenID::Consumer::FailureResponse</a><br />
Class <a href="Consumer/IdResHandler.html" class="link">OpenID::Consumer::IdResHandler</a><br />
Class <a href="Consumer/NoEncryptionSession.html" class="link">OpenID::Consumer::NoEncryptionSession</a><br />
Class <a href="Consumer/SetupNeededResponse.html" class="link">OpenID::Consumer::SetupNeededResponse</a><br />
Class <a href="Consumer/SuccessResponse.html" class="link">OpenID::Consumer::SuccessResponse</a><br />
</div>
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">SUCCESS</td>
<td>=</td>
<td class="context-item-value">:success</td>
<td width="3em"> </td>
<td class="context-item-desc">
Code returned when either the of the OpenID::OpenIDConsumer.begin_auth or
OpenID::OpenIDConsumer.complete_auth methods return successfully.
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">FAILURE</td>
<td>=</td>
<td class="context-item-value">:failure</td>
<td width="3em"> </td>
<td class="context-item-desc">
Code OpenID::OpenIDConsumer.complete_auth returns when the value it
received indicated an invalid login.
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">CANCEL</td>
<td>=</td>
<td class="context-item-value">:cancel</td>
<td width="3em"> </td>
<td class="context-item-desc">
Code returned by OpenIDConsumer.complete_auth when the user cancels the
operation from the server.
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">SETUP_NEEDED</td>
<td>=</td>
<td class="context-item-value">:setup_needed</td>
<td width="3em"> </td>
<td class="context-item-desc">
Code returned by OpenID::OpenIDConsumer.complete_auth when the
OpenIDConsumer instance is in immediate mode and ther server sends back a
URL for the user to login with.
</td>
</tr>
</table>
</div>
</div>
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">session_key_prefix</td>
<td class="context-item-value"> [RW] </td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000301" class="method-detail">
<a name="M000301"></a>
<div class="method-heading">
<a href="Consumer.src/M000301.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000301.html');return false;">
<span class="method-name">new</span><span class="method-args">(session, store)</span>
</a>
</div>
<div class="method-description">
<p>
Initialize a <a href="Consumer.html">Consumer</a> instance.
</p>
<p>
You should create a <a href="Consumer.html#M000301">new</a> instance of the
<a href="Consumer.html">Consumer</a> object with every HTTP request that
handles <a href="../OpenID.html">OpenID</a> transactions.
</p>
<p>
session: the session object to use to store request information. The
session should behave like a hash.
</p>
<p>
store: an object that implements the interface in <a
href="Store.html">Store</a>.
</p>
</div>
</div>
<div id="method-M000300" class="method-detail">
<a name="M000300"></a>
<div class="method-heading">
<a href="Consumer.src/M000300.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000300.html');return false;">
<span class="method-name">openid1_return_to_claimed_id_name</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
See <a href="Consumer.html#M000299">openid1_return_to_claimed_id_name=</a>
</p>
</div>
</div>
<div id="method-M000299" class="method-detail">
<a name="M000299"></a>
<div class="method-heading">
<a href="Consumer.src/M000299.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000299.html');return false;">
<span class="method-name">openid1_return_to_claimed_id_name=</span><span class="method-args">(query_arg_name)</span>
</a>
</div>
<div class="method-description">
<p>
Set the name of the query parameter that this library will use to thread
the requested URL through an <a href="../OpenID.html">OpenID</a> 1
transaction (for use when verifying discovered information). It will be
appended to the return_to URL.
</p>
</div>
</div>
<div id="method-M000298" class="method-detail">
<a name="M000298"></a>
<div class="method-heading">
<a href="Consumer.src/M000298.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000298.html');return false;">
<span class="method-name">openid1_return_to_nonce_name</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
See <a href="Consumer.html#M000297">openid1_return_to_nonce_name=</a>
documentation
</p>
</div>
</div>
<div id="method-M000297" class="method-detail">
<a name="M000297"></a>
<div class="method-heading">
<a href="Consumer.src/M000297.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000297.html');return false;">
<span class="method-name">openid1_return_to_nonce_name=</span><span class="method-args">(query_arg_name)</span>
</a>
</div>
<div class="method-description">
<p>
Set the name of the query parameter that this library will use to thread a
nonce through an <a href="../OpenID.html">OpenID</a> 1 transaction. It will
be appended to the return_to URL.
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000302" class="method-detail">
<a name="M000302"></a>
<div class="method-heading">
<a href="Consumer.src/M000302.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000302.html');return false;">
<span class="method-name">begin</span><span class="method-args">(openid_identifier, anonymous=false)</span>
</a>
</div>
<div class="method-description">
<p>
Start the <a href="../OpenID.html">OpenID</a> authentication process. See
steps 1-2 in the overview for the <a href="Consumer.html">Consumer</a>
class.
</p>
<p>
user_url: Identity URL given by the user. This method performs a textual
transformation of the URL to try and make sure it is normalized. For
example, a user_url of example.com will be normalized to <a
href="http://example.com">example.com</a>/ normalizing and resolving any
redirects the server might issue.
</p>
<p>
anonymous: A boolean value. Whether to make an anonymous request of the <a
href="../OpenID.html">OpenID</a> provider. Such a request does not ask for
an authorization assertion for an <a href="../OpenID.html">OpenID</a>
identifier, but may be used with extensions to pass other data. e.g.
"I don‘t care who you are, but I‘d like to know your time
zone."
</p>
<p>
Returns a <a href="Consumer/CheckIDRequest.html">CheckIDRequest</a> object
containing the discovered information, with a method for building a
redirect URL to the server, as described in step 3 of the overview. This
object may also be used to add extension arguments to the request, using
its add_extension_arg method.
</p>
<p>
Raises <a href="DiscoveryFailure.html">DiscoveryFailure</a> when no <a
href="../OpenID.html">OpenID</a> server can be found for this URL.
</p>
</div>
</div>
<div id="method-M000303" class="method-detail">
<a name="M000303"></a>
<div class="method-heading">
<a href="Consumer.src/M000303.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000303.html');return false;">
<span class="method-name">begin_without_discovery</span><span class="method-args">(service, anonymous)</span>
</a>
</div>
<div class="method-description">
<p>
Start <a href="../OpenID.html">OpenID</a> verification without doing <a
href="../OpenID.html">OpenID</a> server discovery. This method is used
internally by <a href="Consumer.html#M000302">Consumer.begin</a>() after
discovery is performed, and exists to provide an interface for library
users needing to perform their own discovery.
</p>
<p>
service: an <a href="../OpenID.html">OpenID</a> service endpoint
descriptor. This object and factories for it are found in the
openid/consumer/discovery.rb module.
</p>
<p>
Returns an <a href="../OpenID.html">OpenID</a> authentication request
object.
</p>
</div>
</div>
<div id="method-M000304" class="method-detail">
<a name="M000304"></a>
<div class="method-heading">
<a href="Consumer.src/M000304.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000304.html');return false;">
<span class="method-name">complete</span><span class="method-args">(query, current_url)</span>
</a>
</div>
<div class="method-description">
<p>
Returns a subclass of <a href="Consumer/Response.html">Response</a>. The
type of response is indicated by the status attribute, which will be one of
SUCCESS, CANCEL, FAILURE, or SETUP_NEEDED.
</p>
</div>
</div>
<h3 class="section-bar">Protected Instance methods</h3>
<div id="method-M000315" class="method-detail">
<a name="M000315"></a>
<div class="method-heading">
<a href="Consumer.src/M000315.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000315.html');return false;">
<span class="method-name">association_manager</span><span class="method-args">(service)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000310" class="method-detail">
<a name="M000310"></a>
<div class="method-heading">
<a href="Consumer.src/M000310.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000310.html');return false;">
<span class="method-name">cleanup_last_requested_endpoint</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000312" class="method-detail">
<a name="M000312"></a>
<div class="method-heading">
<a href="Consumer.src/M000312.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000312.html');return false;">
<span class="method-name">cleanup_session</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000318" class="method-detail">
<a name="M000318"></a>
<div class="method-heading">
<a href="Consumer.src/M000318.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000318.html');return false;">
<span class="method-name">complete_cancel</span><span class="method-args">(unused_message, unused_return_to)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000319" class="method-detail">
<a name="M000319"></a>
<div class="method-heading">
<a href="Consumer.src/M000319.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000319.html');return false;">
<span class="method-name">complete_error</span><span class="method-args">(message, unused_return_to)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000321" class="method-detail">
<a name="M000321"></a>
<div class="method-heading">
<a href="Consumer.src/M000321.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000321.html');return false;">
<span class="method-name">complete_id_res</span><span class="method-args">(message, current_url)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000317" class="method-detail">
<a name="M000317"></a>
<div class="method-heading">
<a href="Consumer.src/M000317.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000317.html');return false;">
<span class="method-name">complete_invalid</span><span class="method-args">(message, unused_return_to)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000320" class="method-detail">
<a name="M000320"></a>
<div class="method-heading">
<a href="Consumer.src/M000320.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000320.html');return false;">
<span class="method-name">complete_setup_needed</span><span class="method-args">(message, unused_return_to)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000313" class="method-detail">
<a name="M000313"></a>
<div class="method-heading">
<a href="Consumer.src/M000313.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000313.html');return false;">
<span class="method-name">discover</span><span class="method-args">(identifier)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000311" class="method-detail">
<a name="M000311"></a>
<div class="method-heading">
<a href="Consumer.src/M000311.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000311.html');return false;">
<span class="method-name">discovery_manager</span><span class="method-args">(openid_identifier)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000316" class="method-detail">
<a name="M000316"></a>
<div class="method-heading">
<a href="Consumer.src/M000316.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000316.html');return false;">
<span class="method-name">handle_idres</span><span class="method-args">(message, current_url)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000308" class="method-detail">
<a name="M000308"></a>
<div class="method-heading">
<a href="Consumer.src/M000308.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000308.html');return false;">
<span class="method-name">last_requested_endpoint</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000309" class="method-detail">
<a name="M000309"></a>
<div class="method-heading">
<a href="Consumer.src/M000309.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000309.html');return false;">
<span class="method-name">last_requested_endpoint=</span><span class="method-args">(endpoint)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000314" class="method-detail">
<a name="M000314"></a>
<div class="method-heading">
<a href="Consumer.src/M000314.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000314.html');return false;">
<span class="method-name">negotiator</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000305" class="method-detail">
<a name="M000305"></a>
<div class="method-heading">
<a href="Consumer.src/M000305.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000305.html');return false;">
<span class="method-name">session_get</span><span class="method-args">(name)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000307" class="method-detail">
<a name="M000307"></a>
<div class="method-heading">
<a href="Consumer.src/M000307.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000307.html');return false;">
<span class="method-name">session_key</span><span class="method-args">(suffix)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000306" class="method-detail">
<a name="M000306"></a>
<div class="method-heading">
<a href="Consumer.src/M000306.html" target="Code" class="method-signature"
onclick="popupCode('Consumer.src/M000306.html');return false;">
<span class="method-name">session_set</span><span class="method-args">(name, val)</span>
</a>
</div>
<div class="method-description">
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>
|