douxun3496 2013-10-14 21:04
浏览 79
已采纳

服务器到服务器oauth2

im trying to implement a Golang application for accesing Google Analytics data. but all the examples uses tokens that dies in one hour. In the api access i found a "Certificate access" that are designed to be used to access from servers, but i failed to find examples of its implementation in Golang. there is some reading or may you can enlighten my path for this?

im using this library. code.google.com/p/google-api-go-client/

reading some post here I found this Service Applications and Google Analytics API V3: Server-to-server OAuth2 authentication?

but it seems that it will not work directly. is really no way of doing this w/o hacking it around?

  • 写回答

2条回答 默认 最新

  • doubi1818 2013-10-15 05:03
    关注

    have you checked out the OAuth2 package? I've used it for user-authorised calls, and hacked it around a bit to allow it to handle multiple authorisation sources.

    I haven't tested it with pure server-to-server comms, but you should be able to hack the transport code to get it to do what it needs...

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 深度学习残差模块模型
  • ¥20 两个不同Subnet的点对点连接
  • ¥50 怎么判断同步时序逻辑电路和异步时序逻辑电路
  • ¥15 差动电流二次谐波的含量Matlab计算
  • ¥15 Can/caned 总线错误问题,错误显示控制器要发1,结果总线检测到0
  • ¥15 C#如何调用串口数据
  • ¥15 MATLAB与单片机串口通信
  • ¥15 L76k模块的GPS的使用
  • ¥15 请帮我看一看数电项目如何设计
  • ¥23 (标签-bug|关键词-密码错误加密)