Top Description Fields Constructors Methods
com.oracle.bmc.auth.internal

public Class ImdsRptPathProvider

extends AbstractTemplateRptPathProvider
Class Inheritance
Imports
com.oracle.bmc.InternalSdk, com.oracle.bmc.http.client.HttpClient, .HttpProvider, .HttpResponse, .Method, .StandardClientProperties, com.oracle.bmc.http.internal.SyncFutureWaiter, com.oracle.bmc.util.VisibleForTesting, org.slf4j.Logger, java.io.IOException, java.net.URI, java.util.Collections, .HashMap, .Map, java.util.concurrent.TimeUnit

This path provider is used as a fallback when environment variables are not set.

For the path, use the current path: "/20180711/resourcePrincipalToken/{id}" For the resource id, use IMDS to get the instance id

Field Summary

Modifier and TypeField and Description
private static final String
AUTHORIZATION_HEADER_VALUE

The Authorization header value to be sent for requests to the metadata service.

private static final String
IMDS_PATH_TEMPLATE

Default path template of metadata service.

private static final Logger
protected static final String
METADATA_SERVICE_BASE_URL

Default base url of metadata service.

private final Map<String, String>

Constructor Summary

AccessConstructor and Description
public
ImdsRptPathProvider(String
string template with placeholders like "{id}"
pathTemplate
)

Constructor of ImdsRptPathProvider.

Method Summary

Modifier and TypeMethod and Description
pack-priv static Map<String, String>
public static String
getInstanceIdFromIMDS(String metadataServiceBaseUrl)

pack-priv static String
protected Map<String, String>
Inherited from com.oracle.bmc.auth.internal.AbstractTemplateRptPathProvider:
getPath

Field Detail

AUTHORIZATION_HEADER_VALUEback to summary
private static final String AUTHORIZATION_HEADER_VALUE

The Authorization header value to be sent for requests to the metadata service.

IMDS_PATH_TEMPLATEback to summary
private static final String IMDS_PATH_TEMPLATE

Default path template of metadata service.

LOGback to summary
private static final Logger LOG

Hides com.oracle.bmc.auth.internal.AbstractTemplateRptPathProvider.LOG.

METADATA_SERVICE_BASE_URLback to summary
protected static final String METADATA_SERVICE_BASE_URL

Default base url of metadata service.

replacementsback to summary
private final Map<String, String> replacements

Constructor Detail

ImdsRptPathProviderback to summary
public ImdsRptPathProvider(String pathTemplate)

Constructor of ImdsRptPathProvider.

Parameters
pathTemplate:String

string template with placeholders like "{id}"

Method Detail

buildReplacementsback to summary
pack-priv static Map<String, String> buildReplacements()
getInstanceIdFromIMDSback to summary
public static String getInstanceIdFromIMDS(String metadataServiceBaseUrl)
Annotations
@InternalSdk
@VisibleForTesting
getPathTemplateback to summary
pack-priv static String getPathTemplate()
getReplacementsback to summary
protected Map<String, String> getReplacements()

Implements abstract com.oracle.bmc.auth.internal.AbstractTemplateRptPathProvider.getReplacements.

Annotations
@Override