Where to store OAUTH2 access token in mvc5 web app

心不动则不痛 提交于 2019-12-12 18:32:56

问题


I have an API (.net web api 2) that is to be consumed by a (external) mvc5 application. The API implements a simple authorization server for issuing tokens to consumers (The implementation follows the example given by thinktecture identitymodel samples).

The API is to be consumed by (among others) users of a GUI (mvc5 application) which have to log in to gain access to the application. When logging in, a http request is issued by the application to the API which in the case of correct credentials returns the access token. Where should I save this token (so that the user does not have to log in again when changing page), should I store it in a cookie or a session or perhaps as a claim to forms authentication?

来源:https://stackoverflow.com/questions/25280941/where-to-store-oauth2-access-token-in-mvc5-web-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!