googleapis / googleapis/google-cloud-java

[google-auth-library-java] AppEngineCredential depends on legacy bundled service

Open
#12,596 9 comments 0 reactions 0 assignees View on GitHub
priority: p3 type: bug
Dominant language
Java
Stars
2.1k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
154

Description

Hello, we are upgrading GAE from Java 8 to 11 and also trying to get ride of legacy bundled service .

Here is how we generate default AccessToken today.
```
GoogleCredentials credentials = AppEngineCredentials.newBuilder().setScopes(scopes).setAppIdentityService(AppIdentityServiceFactory.getAppIdentityService()).build();
```
The reason we do it this way is because if using `GoogleCredentials.getDefaulCredential`, because the call to .createScoped will silently proceed by doing nothing?

Question:
1: How to use AppEngineCredentials without turning on legacy bundle? Because I get feature not enabled error when calling without turning it on
2: Do we still need to include `appengine-sdk1.0` in our dependency? As those imports are there:
```
import com.google.appengine.api.appidentity.AppIdentityService;
import com.google.appengine.api.appidentity.AppIdentityService.GetAccessTokenResult;
import com.google.appengine.api.appidentity.AppIdentityServiceFactory;
```

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.