拥有AccountManager和OAuth2

时间:2014-11-26 20:40:59

标签: java android oauth-2.0 authorization accountmanager

我在某个网站上进行了oauth2授权。这是WebView和页面的经典方式,其中用户添加密码和登录,按下允许按钮等。然后它获取refresh_token,并通过另一个POST消息获取auth_token,我必须存储(在AccountManager中)和用户以后。

我可以在AccountManager的帮助下完成吗?我怎样才能做到这一点? 我想知道用户是否应该输入两次登录名和密码 - 一个用于帐户管理员(当我应该创建它时),以及其他用于WebView表单?

我只需要使用AccountManager来最近同步数据。

1 个答案:

答案 0 :(得分:0)

Don't know if you still looking for a solution on this.

Short answer it's yes u can this example may give you the inspiration you need : https://github.com/learning-layers/android-openid-connect It goes a little futher supporting OIDC workflow.

The author is working on a lib maybe it's worth looking for this release.