Closed
Description
Following test case used to work in google-api-client
1.23.0, but breaks in 1.25.0:
@Test
public void testMe() throws IOException {
final MockTokenServerTransport transport = new MockTokenServerTransport();
transport.addServiceAccount(ServiceAccount.EDITOR.getEmail(), ACCESS_TOKEN);
ServiceAccountCredentials creds = ServiceAccountCredentials.fromStream(ServiceAccount.EDITOR.asStream(),
new HttpTransportFactory() {
@Override
public HttpTransport create() {
return transport;
}
});
GoogleCredentials scoped = creds.createScoped(
ImmutableList.of("https://www.googleapis.com/auth/cloud-platform"));
assertNotNull(scoped.refreshAccessToken());
}
In the latest version I must pass in the URL "https://accounts.google.com/o/oauth2/token"
to the MockTokenServerTransport
. Is this intentional or a regression?