简体   繁体   English

将Windows用户“令牌”传递给WCF进行身份验证

[英]Passing Windows User 'Token' to WCF to authenticate

Does anyone know how I can pass a 'token'? 有人知道我如何通过“令牌”吗? to a WCF service to authenticate a windows user is valid? WCF服务以验证Windows用户是否有效?

I want to write a wcf service that can use either U/P combo or windows login for an authentication service that will return its own standard token. 我想编写一个wcf服务,该服务可以使用U / P组合或Windows登录进行身份验证服务,该服务将返回其自己的标准令牌。 The idea being that windows authentication is just 1 method my service can support. Windows身份验证只是我的服务可以支持的一种方法。

I have see authenticating Username and password against ADFS but I won't have the password.. just the username. 我看到针对ADFS验证用户名和密码,但是我没有密码。

You can specify Windows Credential type for your service at both ends in the serviceModel config. 您可以在serviceModel配置的两端为服务指定Windows凭据类型。

<system.serviceModel>
<bindings>
    <wsHttpBinding>
        <binding name="httpService">
            <security mode="Message">
                <message clientCredentialType="Windows" algorithmSuite="Default" />
            </security>
        </binding>
    </wsHttpBinding>
</bindings></system.serviceModel>

http://msdn.microsoft.com/en-us/library/ms733836.aspx http://msdn.microsoft.com/en-us/library/ms733836.aspx

You will also need to configure IIS appropriately. 您还需要适当配置IIS。

http://msdn.microsoft.com/en-us/library/aa292114(v=vs.71).aspx http://msdn.microsoft.com/zh-CN/library/aa292114(v=vs.71).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM