-1

I am using the Java Api

We have a web application wherein we want our file to be uploaded on an on_click even on some submit button. We don't want the browser to prompt us to enter the username and password to get the access token. Instead, we can provide the username and the password through the code so that we get the access token and the file will be uploaded directly.

Right now, OAuth 2 requires that we enter the username and password to be entered through the browser.

Reading through the post, I see that we can authenticate for the first time, obtain a refresh token and then keep on refreshing that token periodically. But our application requirements does not allow for this work-flow.

Is there any way to automate the process of entering the user credentials using Java code. or Is there any library that will keep the browser away from the process.

Ashpak
  • 1
  • 1
  • What does your application do that you don't want users to ever have to login to Box? Using your application with Box should be considered like using an application with Twitter, Facebook, or Google. All of those services ask users to authenticate the application, so that the user can be in control, long-term, of the application putting things into their account. – Peter Nov 11 '13 at 23:12

1 Answers1

0

Is there any way to automate the process of entering the user credentials using Java code. or Is there any library that will keep the browser away from the process.

Not currently. The general point of the OAuth 2 auth code flow is to protect the user from having to give their login credentials to a third party other than the service provider.

seanrose
  • 8,185
  • 3
  • 20
  • 21