令牌管理WCF [英] Token management in WCf

查看:255
本文介绍了令牌管理WCF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在那里的原始消息是从服务器上使用消息对象(servicemodel.channel)传递给客户一个WCF服务,我在这创建令牌管理系统。即用户将我提供的用户名和密码,我会验证它,并提供一个令牌,然后每一次我将授权令牌还是会有一个计时器后该令牌将reset..any建议对这一要求...

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...

推荐答案

为什么你需要通过自己做到这一点?如果启用安全上下文WCF做了similiar东西给你。在这种情况下,WCF将建立客户端和服务器之间的安全上下文一旦认证和授权成功完成。

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.

这些链接可以帮助你:

安全转换和安全会话

这篇关于令牌管理WCF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆