长期使用OAuth的Andr​​oid应用程序认证住 [英] Long lived authentication with OAuth in Android App

查看:113
本文介绍了长期使用OAuth的Andr​​oid应用程序认证住的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用户怎样授予一个Android应用程序的权限通过OAuth,直到他们决定撤销它访问的资源?例如,为了读取从用户的谷歌日历数据,应用程序需要获得一个身份验证令牌。一个应用程序如何获得长期居住身份验证令牌当它需要它来访问日历数据?

How can a user grant an Android application permission to access a resource via OAuth until they decide to revoke it? For example, in order to read data from a users Google calendar, an app needs to get an authentication token. How can an app get a long lived authentication token to access calendar data when it needs it?

推荐答案

是的,他们可以 - 你要考虑的OAuth。用户可以授予访问日历,这是持久的您的应用程序的权限有限 - 一旦你有OAuth令牌,您可以继续使用它,直到他们撤销它。在所有的可能性,不过,你的应用程序需要将它们发送到您的网站在浏览器中得到OAuth授权。

Yes, they can - you'll want to look into OAuth. The user can grant your app limited permission to access their calendar, which is persistent - once you have the OAuth token, you can keep using it until they revoke it. In all likelihood, though, your app will need to send them to your site in the browser to get the OAuth authorization.

这篇关于长期使用OAuth的Andr​​oid应用程序认证住的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆