--
You received this message because you are subscribed to the xAuth group.
To post, send email to xa...@googlegroups.com
To unsubscribe from this group, send email to
xauth+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/xauth?hl=en
As to whether or not creating a global 'browser' object is a good
idea, that's a different topic ...
Otherwise, I also give a +1 to John's suggestion.
-- Dirk
I also like that proposal very much. BTW, I think "navigator" is what you
want for a scope broader than "document".
http://msdn.microsoft.com/en-us/library/ms535867%28v=VS.85%29.aspx
-Peter
On Wed, Jun 09, 2010 at 11:19:20AM -0700, Chris Messina wrote:
> +1. This is a good solution and provides a pathway to handing off this
> functionality to the browser.
>
> My JS-fu is worse, but shouldn't it be more like:
>
> <script>
> if (!*browser*.XAuth) {
I just remembered one significant behavioral difference between MSIE
and Firefox that is relevant. MSIE windows inherit session credentials
from their parents, and do not share session credentials with windows
spawned from different ancestors. You can open two MSIE windows and
with each one log in to the same website as different users if that
website uses session-scoped auth cookies.
Firefox, by contrast, shares session credentials, cookies, etc. across
different browser windows.
In the Firefox model, "navigator" seems right. But in MSIE, if an
Extender adds a token with extend() that it flags as a session token,
I think "document" might make more sense. And it's easy for document.XAuth
to refer to a browser-scoped object, but perhaps not so easy for
navigator.XAuth to refer to window-specific token collections, especially
if the core navigator JS object is actually shared between MSIE windows.
Chrome might have similar issues due to its one-process-per-tab security
model.
-Peter
On Wed, Jun 09, 2010 at 05:01:30PM -0400, Peter Watkins wrote:
> +1
>
> I also like that proposal very much. BTW, I think "navigator" is what you
> want for a scope broader than "document".
>
> http://msdn.microsoft.com/en-us/library/ms535867%28v=VS.85%29.aspx
> On Wed, Jun 09, 2010 at 11:19:20AM -0700, Chris Messina wrote:
1) I believe the Navigator object is basically a readonly collection
of properties and probably
should not be encouraged for new use.
2) I don't think we want to encourage a direct link to a
"browser-wide" object. It is possible that
we might have this stuff return window-specific data (tied to a
particular session). For example,
whatever the calls return might be very different in a normal Chromium
window and an Incognito
window. I think that call can be left up to the implementation as to
what is returned, and so
"window.XAuth" feels more correct to me.
Of course, window.XAuth also opens up the possibility that different
windows might have
completely different implementations of the object (as well as
different states). Whether or not this
is a good thing, I'm not sure yet.
-- Dirk
I agree that a browser-wide object might lead to regret since it locks us into the idea that the current user-service-context is identical in every tab. (The incognito example is a fine one)
Peter Watkins wrote:
> Firefox, by contrast, shares session credentials, cookies, etc. across
> different browser windows.
I would not assume that this will always be the same. I am aware that some conversations may be happening that might change this behavior.
I concur that window feels like the right scope to me right now.
m
--
Michael Hanson, Mozilla Labs (@michaelrhanson)