Token management in WCf

对着背影说爱祢 提交于 2019-12-25 01:17:36

问题


I have a WCf service where raw message is passed from server to client using Message Object(servicemodel.channel) , I have to create a token management system in this. i.e user will provide me the user name and password i will validate it and provide a token then every time i will authorize the token or there will be a timer after which this token will reset..any suggestion for this requirement...


回答1:


why do you need to do this by yourselves? WCF has done the similiar thing for you if you enable security context. In this case, WCF will set up security context between client and server once the authentication and authorization was done successfully.

In the subsequent request, the server won't authenticate the username and password until the security context is timeout.

I think this should satisfy your requirement.

These links may help you:

secure conversion and secure session



来源:https://stackoverflow.com/questions/6891492/token-management-in-wcf

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