Reputation: 489
I am writing a java desktop application for a single user that needs to access files in Google Drive in one specific google account which I want to hard code into the application. I am very confused about this whole OAuth 2.0 business which I am not familiar with it. Is there a simple way to login to the google apis when the user is known in advance?
Upvotes: 0
Views: 927
Reputation: 9639
You can have a look at the scribe library, this should make your life easier.
https://stackoverflow.com/tags/scribe/info
https://github.com/fernandezpablo85/scribe-java
Scribe provides an easy, extensible and bug-free way of OAuth-signing requests. But you have to check about their support for oauth 2.0: "OAuth 2.0 support is not going to get any more attention and may eventually be deprecated and dropped." But there are several forks to support Google OAuth 2.0
https://github.com/Kobee1203/scribe-java
https://github.com/bistri/scribe-java/
Upvotes: 2