I am new to OAuth 2.0 and a little bit unclear about the best approach for user case, which is described below.
I have a web service which we use to pull data from box.com. It is multi-thread services, in that there can be multiple thread pulling from box.com at the same time. Plus, we have multiple instance of the web services, which will pull files from box.com. They do collaborate in a way so that the same file does not get pulled twice by different instance of the service. If an instance of the web service is down, the work load is migrated to the other available instances.
So here is a list of questions?
- Is the BoxClient provided by the box.com java api v2 thread safe?
- If the BoxClient is not thread safe, when instantiating a new client, do I need to request to the user/owner of the folder to approve my request for a new access code? It seems like quite a burden for the user/owner of the folder.
- If I keep a copy of the refresh token, Can I create a new BoxClient without going through the dance of oauth 2.0 again? Any example code?