evan.s at dreskin.net
Fri Jun 22 07:23:44 EDT 2007
Quoting Etan Reisner <pidgin at unreliablesource.net>:
> On Thu, Jun 21, 2007 at 09:01:01PM -0400, Evan Schoenberg wrote:
>> The password may not be available to the callback outside of its
>> parameters, at least not without special-casing the 'password' field
>> of the registration form.
> What do you mean here? I'm not sure I follow. How would one supply a
> password such that it could be passed to the callback but not available
> in some other way?
Turns out this isn't the case, since it can be accessed from the
GaimAccount object if it's properly set there, but here's what I was
1) RequestFields says, "show these fields and give me the results".
2) UI does so.
3) This information goes back to the Jabber prpl, which puts it into
various internal structs (JabberStream, for example) and uses it for
4) Registration succeeeds
If it weren't put into a publicly-facing object like GaimAccount, the
password would only be accessible to the UI if (a) the UI
special-cased the 'password' field when doing the request fields
originally, storing it for later use, (b) the UI dove into the Jabber
internal object, which obviously is a bad idea, or (c) it were passed
in the callback.
Irrelevant since GaimAccount can carry the information just fine :)
> What if I typo my account name? I certainly don't want a second account
> registered automatically for me. Or did you mean popping up a dialog
> saying 'It looks like you don't have an account on this server. Would you
> like me to create it for you?' ?
The latter, definitely. That's how Adium currently handles it, though
Andreas has, I believe, made the process much smoother. The current
implementation is along the lines of, "The server reported an invalid
user name or password. If you don't already have an account on this
server (jabber.org), Adium can create one for you with the user name
XXX. <Cancel> <Register>" (If invalid user name can be distinguished
from invalid password, that should be refined to only prompt for the
user name case).
More information about the Devel