java - Specific filename for FileDataStoreFactory (Google API) -


First, if we were using FileCredentialStore , then we stored the file for the credential information Are able to specify the name.

However, file credentialstore gets lost

Now, we are using FileDataStoreFactory Are there.

However, there is no way for us to now have a specific saved file name. We can only name specific directories. StoredCredential As I have different credential information, I would like to create a group in a single directory.

something like this:

  fileDataStorForDistorFactor = new fileDataStoreFactor ("/ Path / to / dir "); Documents & LTs; StoredCredential & gt; datastore = dataStoreFactory.getDataStore ("specific filename"); GoogleAuthorizationCodeFlow Flow = New GoogleAuthorizationCodeFlow.Builder (httpTransport, JSON_FACTORY, Client Sites, Scope) .setCredentialDataStore (Datastore) .build ();    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -