Thinktecture IdentityModel token rejected

北城以北 提交于 2019-12-25 04:05:15

问题


My Durandal SPA app performs BASIC authentication to acquire a session token which it then presents in headers to access Web API controller methods. This works fine.

On successful authentication I cache the access_token in localStorage so I can re-acquire it from local storage to preserve the session in the event of browser closure or refresh. The token is re-acquired but it is rejected by the server with an Unauthorized message.

This question starts by saying that the OP has successfully done what I am trying to do, so it's certainly possible, but the code he shows is a sample of (unsuccessfully) trying to do cookie mapping and I can't divine the nature of my problem from it.

One of the answers to this question says

Fortunately, WIF has a way to mitigate [replay attacks]. By configuring:

<identityConfiguration>
  .......
  <tokenReplayDetection enabled="true" />
  .....
</identityConfiguration>

I do in fact have WIF installed on my development workstation, but I wouldn't know where to start looking for this setting. A search of my HDD found "tokenReplayDetection" in 17 System.IdentityModel related DLLs, but not in any config files.

Does anyone think this is in fact the problem and if so where does it live? Any other thoughts also gratefully received.

来源:https://stackoverflow.com/questions/27731539/thinktecture-identitymodel-token-rejected

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