On Mon, Apr 30, 2012 at 6:17 PM, François Kooman
<
Francoi...@surfnet.nl> wrote:
> On 4/30/12 6:14 PM, Michiel de Jong wrote:
>> Francois, what if you expire the tokens after they have not been used
>> for 8 hours? that way you can finish your current session, at least. i
>> agree with Jan that expiring a token while the user has a session open
>> in an app is annoying.
>
> I guess you could do that, but that is not OAuth then.
why not? i would say the resource server could notify the
authorization server whether token is being used, and the
authorization server is free to display this information to the user
and also to factor that information into its automated decisions.
>
>> about the pop-up vs in-tab dance, i guess both are possible, and i
>> don't know which one is more invasive. i'll make it configurable for
>> now. lightboxes are not an option, since they don't display the url in
>> the address bar.
>
> I wonder how bad it is to play the redirect game (it takes usually less
> than a second) once every 1/4/8 hrs. If you make sure localStorage
> retains all data that should really not be a problem...
i guess if the library sees a token expiry coming, it could wait for a
button click and open an unsolicited popup, but it is definitely ugly
and not ideal. and the question is when it's in the user's interest to
automatically expire tokens. i think this is when they haven't been
used for say 2 months, or when the user is deleted. if the user is
deleted then ideally all access tokens could be deleted immediately.
this may be more difficult in surfnet's case, but generally speaking i
think it would be better.
so really what we're trying to solve here is not double-checking
whether the OAuth grant is still valid, but rather checking whether
the SAML grant from the IdP to the auth server is still valid.
> Note, this is
> exactly the same for SAML sessions and that doesn't seem to cause any
> problems...
>
maybe we can do better than SAML. i think UX is really important
> Surely you can implement some "idle" detection that refreshes an access
> token when the user is not doing anything and the token is about to
> expire...
but why is it useful? with this, the app signals to the remoteStorage
that it's still active. the remoteStorage can also know this by
looking at the activity on the storage server