简体   繁体   English

WCF REST认证

[英]WCF REST Authetication

I have implemented OAuth Authentication for the WCF REST Service (c#) which is responding in JSON Format by using link http://www.codeproject.com/Tips/817102/Consuming-OAUTH-Enabled-Restful-WCF-Service-using this authentication is working fine but client is saying that "we dont use js... mobile native client is Objective-c for iOS and Java for android.." Could you please suggest which is the best way to implement Authentication in this scenario. 我已经为WCF REST服务(c#)实现了OAuth身份验证,该服务通过使用链接http://www.codeproject.com/Tips/817102/Consuming-OAUTH-Enabled-Restful-WCF-Service-以JSON格式进行响应,身份验证工作正常,但客户端说“我们不使用js ...移动本机客户端是针对iOS的Objective-c和针对Android的Java ..”您能否建议在这种情况下哪种是实现身份验证的最佳方式。 I read many article but most of them are using certificates for Authentication. 我读了许多文章,但大多数文章都使用证书进行身份验证。 Could you please advise any basic authentication like just passing username and password or any inbuilt authentication... 您能否告知任何基本身份验证,例如传递用户名和密码或任何内置身份验证...

It should not be too hard to find information about this. 找到有关这方面的信息应该不会太难。 A quick Google search turned up this Google Developers page , for example. 例如, 谷歌开发者快速浏览了这个谷歌开发者页面 I haven't drilled too much into the details, but it seems reliable and relevant to what your asking for. 我没有对细节进行过多的研究,但是它似乎是可靠的并且与您的要求有关。

From the summary: 从摘要:

This document explains how to use the GoogleCredential utility class to do OAuth 2.0 authorization with Google services. 本文档说明了如何使用GoogleCredential实用工具类对Google服务进行OAuth 2.0授权。 For information about the generic OAuth 2.0 functions that we provide, see OAuth 2.0 and the Google OAuth Client Library for Java. 有关我们提供的通用OAuth 2.0功能的信息,请参阅OAuth 2.0和适用于Java的Google OAuth客户端库。

They also provide a link to Google`s OAuth API: 它们还提供了Google的OAuth API的链接:

https://developers.google.com/api-client-library/java/google-api-java-client/reference/1.20.0/com/google/api/client/googleapis/auth/oauth2/package-summary https://developers.google.com/api-client-library/java/google-api-java-client/reference/1.20.0/com/google/api/client/googleapis/auth/oauth2/package-summary

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

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