AntiForgery.GetTokens: what is the purpose of the oldCookieToken parameter?

为君一笑 提交于 2019-12-03 10:52:23

AntiForgery.GetTokens will try to reuse the old cookie token for validation purposes. So if you already have a validation token you want to reuse, it will attempt to use it instead of generating a new one. If the old token is invalid, it will generate a new one and use it instead.

So passing null to oldCookieToken is valid. It simply tells GetTokens to always generate a new cookie token.

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