【问题标题】:How can i verify if my google web store application is licensed using asp.net?如何验证我的谷歌网上商店应用程序是否使用 asp.net 获得许可?
【发布时间】:2011-12-18 03:09:27
【问题描述】:

我正在使用 DotNetOpenAuth.dll 来获取用户 ID,但我不知道如何发送 google 需要的签名 OAuth 请求:

http://code.google.com/intl/it-IT/chrome/webstore/docs/check_for_payment.html

该示例仅显示 java 代码

感谢您的帮助

【问题讨论】:

    标签: asp.net oauth dotnetopenauth chrome-web-store


    【解决方案1】:

    转到http://www.dotnetopenauth.net/ 并阅读文档,您应该在那里找到所需的一切。

    编辑: 我不确定这是否正确,但这里有一些 c# 中的示例代码

    var serviceProvider = new ServiceProviderDescription();
    var tokenManager = new TokenManager(); //make an implementation of IConsumerTokenManager
    var oauth = new WebConsumer(serviceProvider, tokenManager); //instanciate an consumer
    var user = new User(); //User class contains an implementation of getFederatedIdentity()
    var url = new Uri(string.Format(SERVER_URL,APP_ID,HttpUtility.HtmlEncode(user.getFederatedIdentity())));//create the url
    var response = oauth.PrepareAuthorizedRequestAndSend(
        new MessageReceivingEndpoint(url, HttpDeliveryMethods.AuthorizationHeaderRequest), TOKEN); //Send the request
    //do what you want with the response
    

    【讨论】:

    • 我读过它,但我找不到关于谷歌许可系统的任何信息。有什么建议吗?
    • @Merlino 我帮不了你了,我已经用 C# 中的示例代码更新了我的答案,但是如果没有足够的信息,我建议你加入他们的谷歌群组并在那里提问。
    • 无反应...任何地方!很奇怪。没有人使用谷歌应用程序和 asp.net?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多