IdentityModel / oidc-token-manager

Apache License 2.0
51 stars 36 forks source link

Slide the access token when it is used #8

Closed kylegalbraith closed 9 years ago

kylegalbraith commented 9 years ago

I am using a very similar flow to the one that is described in this issue over at the IS3 repo, https://github.com/IdentityServer/IdentityServer3/issues/1363. In fact I am already using a lot of oidc-token-manager to obtain my tokens and stash them on the client. I have a token manager that lives in an angular directive that initiates the login over to IS3, from there the user logs in and sent back to a callback page where the tokens are checked and put into local storage.

However, much like the original poster in that issue describes. I would like to be able to extend the token when the user actually uses the token. So the flow would go something like this:

  1. Users logs in, token is stored in local
  2. Users hits an API with the token passed over to it. At this point the token expiration should be extended as they are clearly active. How should this be implemented via IS3 and my token manager?
brockallen commented 9 years ago

You can't extend tokens like you can cookies. You need to go back to the token service and get a new token.

kylegalbraith commented 9 years ago

@brockallen right which I believe is what I am doing, perhaps closing this issue and discussing my idea over in this issue instead: https://github.com/IdentityModel/oidc-client/issues/9