public GoogleCredentials getCredentials()

in alloydb-jdbc-connector/src/main/java/com/google/cloud/alloydb/DefaultCredentialFactory.java [25:38]


  public GoogleCredentials getCredentials() {
    GoogleCredentials credentials;
    try {
      credentials = GoogleCredentials.getApplicationDefault();
    } catch (IOException e) {
      throw new RuntimeException("failed to retrieve OAuth2 access token", e);
    }

    if (credentials.createScopedRequired()) {
      credentials = credentials.createScoped(Arrays.asList(SCOPE_CLOUD_PLATFORM));
    }

    return credentials;
  }