@Test public void whenInstanceProfileCredentialsInMetadataServiceReturnJson() throws Exception { server.enqueue(new MockResponse().setBody("route53-readonly")); server.enqueue(new MockResponse().setBody(securityCredentials)); assertThat(new ReadFirstInstanceProfileCredentialsOrNull(server.getUrl( InstanceMetadataHook.DEFAULT_URI.getPath()).toURI()).get()) .isEqualTo(securityCredentials); assertThat(server.takeRequest()).hasPath("/latest/meta-data/iam/security-credentials/"); assertThat(server.takeRequest()).hasPath( "/latest/meta-data/iam/security-credentials/route53-readonly"); }
@Provides Credentials get(denominator.Provider provider) { return checkValidForProvider(MapCredentials.from(parseJson(iipJsonProvider.get())), provider); }
InstanceProfileCredentialsProvider { @Provides Credentials get(denominator.Provider provider) { return checkValidForProvider(MapCredentials.from(parseJson(iipJsonProvider.get())), provider); } }
InstanceProfileCredentialsProvider { @Provides Credentials get(denominator.Provider provider) { return checkValidForProvider(MapCredentials.from(parseJson(iipJsonProvider.get())), provider); } InstanceProfileCredentialsProvider();  InstanceProfileCredentialsProvider(URI baseUri);  InstanceProfileCredentialsProvider(Provider<String> iipJsonProvider); }
InstanceProfileCredentialsProvider { @Provides Credentials get(denominator.Provider provider) { return checkValidForProvider(MapCredentials.from(parseJson(iipJsonProvider.get())), provider); } InstanceProfileCredentialsProvider();  InstanceProfileCredentialsProvider(URI baseUri);  InstanceProfileCredentialsProvider(Provider<String> iipJsonProvider); @Override String toString(); }
InstanceProfileCredentialsProvider { @Provides Credentials get(denominator.Provider provider) { return checkValidForProvider(MapCredentials.from(parseJson(iipJsonProvider.get())), provider); } InstanceProfileCredentialsProvider();  InstanceProfileCredentialsProvider(URI baseUri);  InstanceProfileCredentialsProvider(Provider<String> iipJsonProvider); @Override String toString();  }