This is needed for googleapis/google-auth-library-java#90 and google-api-client (creating an issue for both projects):
User's current way:
GoogleCredential googleCredential = new GoogleCredential.Builder()
.setTransport(TRANSPORT).setJsonFactory(JSON_FACTORY)
.setServiceAccountId(emailAddress)
.setServiceAccountPrivateKeyFromP12File(p12File)
.setServiceAccountScopes(scopes)
.setServiceAccountUser(user).build();
Would like: to do:
GoogleCredential googleCredential =
GoogleCredential.fromStream(jsonInputStream, TRANSPORT, JSON_FACTORY).createScoped(Collections.singleton(Oauth2Scopes.USERINFO_EMAIL))
Python you just do:
credentials = credentials.create_delegated(user)
This is needed for googleapis/google-auth-library-java#90 and
google-api-client(creating an issue for both projects):User's current way:
Would like: to do:
Python you just do: