I just made <a href="http://www.myid.net">http://www.myid.net</a> openid service provider using ruby lib.<br>It's for korean :)<br><br>I didn't know about the bug, until I test with word-press openid plugin <br>which use
<span class="q" id="q_11031f7ed9caf843_1">immediate mode and try to redirect user_setup_url. </span><br><br><br><div><span class="gmail_quote">On 1/18/07, <b class="gmail_sendername">Brian Ellin</b> <<a href="mailto:brian@janrain.com">
brian@janrain.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Sangho,<br><br>You are correct. I'll get this fixed for the next release.
<br><br>Also, are you writing a server using the ruby lib, or did you discover<br>this behaviour testing against an existing server?<br><br>Thanks,<br>Brian Ellin<br><a href="mailto:brian@janrain.com">brian@janrain.com</a>
<br><br><br><br>On 1/16/07, sangho shin <<a href="mailto:swizard@gmail.com">swizard@gmail.com</a>> wrote:<br>> hi.<br>> I think current implementation of ruby-openid lib has a bug in<br>> immediate deny answer
<br>><br>> if request is immediate , service provider should call resp =<br>> req.answer(false, server_url)<br>> in this case, current server.rb implementation set user_setup_url<br>> 'checkid_immediate'.
<br>><br>> I think it should be set 'checkid_setup' instead of 'checkid_immediate<br>> so that user or consumer can redirect to user_setup_url<br>><br>><br>> i just copied source code of server.rb
and Server.php. it seems to act<br>> differently<br>><br>><br>> from server.rb<br>><br>> def answer(allow, server_url=nil)<br>> if allow or @immediate<br>> mode = 'id_res'
<br>> else<br>> mode = 'cancel'<br>> end<br>><br>> response = OpenIDResponse.new(self)<br>><br>> if allow<br>> response.add_fields(nil, {
<br>> 'mode' => mode,<br>> 'identity' => @identity,<br>> 'return_to' => @return_to<br>
> })<br>> else<br>> response.add_field(nil, 'mode', mode, false)<br>> response.signed.clear<br>> if @immediate<br>> unless server_url
<br>> raise ArgumentError, "setup_url is required for<br>> allow=false in immediate mode"<br>> end<br>> # make a request just like this one, but immediate mode<br>
> setup_request = self.class.new('checkid_immediate',<br>> @identity,<br>> @return_to,<br>> @trust_root)
<br>> setup_url = setup_request.encode_to_url(server_url)<br>> response.add_field(nil, 'user_setup_url', setup_url, false)<br>> end<br>><br>> end<br>><br>
> return response<br>> end<br>><br>><br>> same part of php lib implementation<br>><br>> function answer($allow, $server_url = null)<br>> {<br>> if ($allow || $this->immediate) {
<br>> $mode = 'id_res';<br>> } else {<br>> $mode = 'cancel';<br>> }<br>><br>> $response = new Auth_OpenID_CheckIDResponse($this, $mode);<br>
><br>> if ($allow) {<br>> $response->fields['identity'] = $this->identity;<br>> $response->fields['return_to'] = $this->return_to;<br>> if (!$this->trustRootValid()) {
<br>> return new Auth_OpenID_UntrustedReturnURL($this->return_to,<br>> $this->trust_root);<br>> }<br>> } else {
<br>> $response->signed = array();<br>> if ($this->immediate) {<br>> if (!$server_url) {<br>> return new Auth_OpenID_ServerError(null,<br>> 'setup_url is required for $allow=false \
<br>> in immediate mode.');<br>> }<br>><br>> $setup_request =& new Auth_OpenID_CheckIDRequest(<br>> $this->identity,
<br>> $this->return_to,<br>> $this->trust_root,<br>> false, ----------->
<br>> this part will set checkid_setup<br>> $this->assoc_handle);<br>><br>> $setup_url = $setup_request->encodeToURL($server_url);<br>><br>
> $response->fields['user_setup_url'] = $setup_url;<br>> }<br>> }<br>><br>> return $response;<br>> }<br>><br>> _______________________________________________
<br>> Dev mailing list<br>> <a href="mailto:Dev@lists.openidenabled.com">Dev@lists.openidenabled.com</a><br>> <a href="http://lists.openidenabled.com/mailman/listinfo/dev">http://lists.openidenabled.com/mailman/listinfo/dev
</a><br>><br><br>_______________________________________________<br>Dev mailing list<br><a href="mailto:Dev@lists.openidenabled.com">Dev@lists.openidenabled.com</a><br><a href="http://lists.openidenabled.com/mailman/listinfo/dev">
http://lists.openidenabled.com/mailman/listinfo/dev</a><br></blockquote></div><br>