0

I've managed to implement the simpleauth package for a basic webapp I've been working on. I now need to send data to this service from a python script running on a Raspberry Pi (the app is a "data logger" for temperature). Before I had implemented the simpleauth package, I could just POST the data and username to the site. Alas, now the response is the login page (to be expected).

If I wanted to connect to this webapp from the command line, I assume I'll need to authenticate myself. However, how would I go about doing this? I assume I'm going to need to programmatically replicate the steps taken by the browser to get a token but I think I've tried this and it hasn't worked. I'm not even sure who my token provider is - my webapp, or Google?

Any tips?

4

1 回答 1

1

如果您尝试在已安装或控制台应用程序上进行身份验证,则需要在将用户重定向到登录/授权页面时urn:ietf:wg:oauth:2.0:oob用作参数。redirect_uri GET一旦您的应用获得授权,他们将在文本框中看到有效的 OAuth 2.0 代码,他们必须将其复制/粘贴到您的应用中。一旦他们这样做了,那么您的应用程序必须遵循通常的服务器端流程的其余部分(用于令牌交换的代码等)。

于 2013-02-22T21:34:19.173 回答