AuthenticationDetailsProvider that uses a session token for
authentication.
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class | SessionTokenAuthenticationDetailsProvider.
Builder for SessionTokenAuthenticationDetailsProvider. |
| public static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final long | |
| private static final long | |
| private static final long | |
| private final String | |
| private static final Logger | |
| private final char[] | |
| private final SimplePrivateKeySupplier | |
| private final Region | |
| private ScheduledFuture | |
| private final ScheduledExecutorService | |
| private volatile String | |
| private final String | |
| private final String | |
| private final String | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | SessionTokenAuthenticationDetailsProvider()
Creates a new instance using the config file at the default location and the default profile. |
| public | SessionTokenAuthenticationDetailsProvider(String
profile to load, optional profile)Creates a new instance using the config file at the default location, see |
| public | SessionTokenAuthenticationDetailsProvider(String
path to the OCI configuration file configurationFilePath, String profile to load, optional profile)Creates a new instance. |
| protected | SessionTokenAuthenticationDetailsProvider(String privateKeyFilePath, Region region, String regionId, String passPhrase, String tenantId, String fingerprint, String userId, String sessionTokenFilePath, String sessionToken, long initialRefreshDelay, long refreshPeriod, TimeUnit timeUnit, long sessionLifetimeHours, ScheduledExecutorService scheduler, boolean usingDefaultScheduler)
|
| public | SessionTokenAuthenticationDetailsProvider(ConfigFileReader.
The configuration file to use. configFileCreates a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public static SessionTokenAuthenticationDetailsProvider. | Returns: A new builder instance.Creates a new SessionTokenAuthenticationDetailsProviderBuilder. |
| public void | |
| public String | getFingerprint()
Implements com. Returns the fingerprint of the key being used. |
| public String | getKeyId()
Implements com. Returns the keyId used to sign requests. |
| public String | getPassPhrase()
Implements com.
Deprecated
Returns the optional pass phrase for the (encrypted) private key. |
| public char[] | getPassphraseCharacters()
Implements com. Returns the optional pass phrase for the (encrypted) private key, as a character array. |
| public InputStream | getPrivateKey()
Implements com. Returns a new InputStream to the private key. |
| public Region | |
| public ExecutorService | |
| public String | |
| public String | getTenantId()
Implements com. Returns the tenant OCID. |
| public String | getUserId()
Implements com. Returns the user OCID. |
| public String | refresh()
Implements com. Refreshes the session token from the file defined in the OCI config file. |
| public synchronized boolean | Returns: true if refresh was successful, false otherwiseMakes a call to the Identity service to refresh the session token. |
| public void | setSessionToken(String
The session token to use. sessionToken)Sets the session token directly from a string. |
| public void | setSessionTokenFromFilePath(String
The file path to set the session token from. sessionTokenFilePath)Loads the session token from the file specified in the file path. |
| private void | setTokenRefreshSchedule(long refreshDelay, long refreshInterval, TimeUnit timeUnit, long sessionLifetime)
Default scheduler refreshes session tokens every 55 minutes and stops after 24 hours. |
| public String | |
| private void | writeCurrentSessionTokenToFile()
Puts the current session token into the file specified by the |