本文介绍了RPC认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用远程过程调用(RPC)本地计算机上的数据通信。我的要求是使用RPC通信处理两者之间的数据,但服务器应该通过某种方式验证客户端。

I'm working on communicating data on local machine using Remote Procedure Calls ( RPC ). My requirement is use RPC to communicate data between two processed, but server should authenticate client by some means.

我碰到RpcBindingSetAuthInfo其中设置身份验证和授权信息。第四个参数是认证服务,它可以从的

I came across RpcBindingSetAuthInfo which set authentication and authorization information. The fourth parameter is authentication service which can be anything from http://msdn.microsoft.com/en-us/library/windows/desktop/aa373556(v=vs.85).aspx

WINNT认证并不适用于我的情况下,由于客户端没有在任何特定的用户身份运行。综观文档,我不明白这验证服务将适用于我的情况。我需要一些方法来验证基于某些令牌等客户端这将是巨大的,如果有人可以提供一些线索/ RPC给予认证的一些指引。

WINNT authentication is not applicable in my case since client does not run under any particular user. Looking at the documentation, I don't understand which authentication service would be applicable in my case. I need some way to authenticate the client based on some token etc. It would be great if someone could shed some light/ give some pointers of RPC authentication.

谢谢,

推荐答案

是令牌生成就是我们在我们的产品中使用为好。为例如当客户机请求来连接到服务器,认证后服务器生成一个唯一的ID,它发送到客户端。现在客户端创建的服务器接口和返回在其上的所有进一步通信可以发生的指针的实例。当客户端断开,服务器或注销其客户端的连接

Yes token generation is what we use in our product as well . For e.g when the client requests to connect to the server , after authentication the server generates a unique id which it sends to the client . Now the client creates an instance of the server interface and which returns a pointer on which all the further communication can take place . When the client disconnects , the server unregisters or removes the unique id from its list of client's connected

这篇关于RPC认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 19:28