简体   繁体   English

使用通过代码提供的用户名和密码访问Google Drive

[英]Accessing google drive with user name and password provided through code

I want to pass Gmail id and password and get the access to users drive. 我想传递Gmail ID和密码并获得对用户驱动器的访问权限。 I don't want to use accounts that can be chosen using intent(account picker) instead i will provide edit-text to enter and user name and password, with which I should be able to access google drive for that user name and password. 我不想使用可以使用intent(帐户选择器)选择的帐户,相反,我将提供编辑文本以输入用户名和密码,我应该可以使用该用户名和密码访问google drive。

Any suggestion how to do this? 任何建议如何做到这一点?

The only way to access google drive through an app is through the google drive API OAUTH system, it's well explained on their docs: 通过应用程序访问Google Drive的唯一方法是通过Google Drive API OAUTH系统,这在他们的文档中有很好的解释:

About OAUTH 关于OAUTH

About authorization protocols 关于授权协议

Your application must use OAuth 2.0 to authorize requests. 您的应用程序必须使用OAuth 2.0来授权请求​​。 No other authorization protocols are supported. 不支持其他授权协议。 If your application uses Google Sign-In, some aspects of authorization are handled for you. 如果您的应用程序使用Google登录,则会为您处理授权的某些方面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM