i have service account domain-wide delegation
i building credentials following code:
googlecredential.builder() .settransport(new nethttptransport()) .setjsonfactory(new jacksonfactory()) .setserviceaccountid(appconfig.service_account_id) .setserviceaccountprivatekeyfromp12file(privatekey) .setserviceaccountscopes(collections.singleton(drivescopes.drive_metadata_readonly)) .setserviceaccountuser(user.getemail()) .build();
and getting drive service that:
drive.builder( new nethttptransport(), jacksonfactory.getdefaultinstance(), credential) .setapplicationname("drive-demo") .build();
everything works smoothly when have opened gdrive in browser. browser tab not connected app anyhow. when browser closed , session expired - can't fetch drive. credential token gets updated , i'm not getting error or exception.
is there kind of 'access-type = offline' domain-wide account? did miss?
looking @ domain-wide delegation docs in drive, doesn't mention works offline.
Comments
Post a Comment