Package com.oracle.bmc.auth
Class AbstractRequestingAuthenticationDetailsProvider
- java.lang.Object
-
- com.oracle.bmc.auth.AbstractRequestingAuthenticationDetailsProvider
-
- All Implemented Interfaces:
AbstractAuthenticationDetailsProvider
,BasicAuthenticationDetailsProvider
- Direct Known Subclasses:
InstancePrincipalsAuthenticationDetailsProvider
,ResourcePrincipalAuthenticationDetailsProvider
public class AbstractRequestingAuthenticationDetailsProvider extends Object implements BasicAuthenticationDetailsProvider
Base class for authentication details providers that make remote requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractRequestingAuthenticationDetailsProvider.Builder<B extends AbstractRequestingAuthenticationDetailsProvider.Builder<B>>
Base class for builders.protected static class
AbstractRequestingAuthenticationDetailsProvider.CachingSessionKeySupplier
Helper class to cache the private key as bytes so we don’t have to parse it every time.
-
Field Summary
Fields Modifier and Type Field Description protected FederationClient
federationClient
protected AbstractRequestingAuthenticationDetailsProvider.CachingSessionKeySupplier
sessionKeySupplier
-
Constructor Summary
Constructors Constructor Description AbstractRequestingAuthenticationDetailsProvider(FederationClient federationClient, SessionKeySupplier sessionKeySupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getKeyId()
Returns the keyId used to sign requests.String
getPassPhrase()
Deprecated.char[]
getPassphraseCharacters()
Returns the optional pass phrase for the (encrypted) private key, as a character array.InputStream
getPrivateKey()
Returns a new InputStream to the private key.
-
-
-
Field Detail
-
federationClient
protected final FederationClient federationClient
-
sessionKeySupplier
protected final AbstractRequestingAuthenticationDetailsProvider.CachingSessionKeySupplier sessionKeySupplier
-
-
Constructor Detail
-
AbstractRequestingAuthenticationDetailsProvider
public AbstractRequestingAuthenticationDetailsProvider(FederationClient federationClient, SessionKeySupplier sessionKeySupplier)
-
-
Method Detail
-
getKeyId
public String getKeyId()
Description copied from interface:BasicAuthenticationDetailsProvider
Returns the keyId used to sign requests.- Specified by:
getKeyId
in interfaceBasicAuthenticationDetailsProvider
- Returns:
- The keyId.
-
getPrivateKey
public InputStream getPrivateKey()
Description copied from interface:BasicAuthenticationDetailsProvider
Returns a new InputStream to the private key.This stream should be closed by the caller, implementations should return new streams each time.
- Specified by:
getPrivateKey
in interfaceBasicAuthenticationDetailsProvider
- Returns:
- A new InputStream.
-
getPassPhrase
@Deprecated public String getPassPhrase()
Deprecated.Description copied from interface:BasicAuthenticationDetailsProvider
Returns the optional pass phrase for the (encrypted) private key.- Specified by:
getPassPhrase
in interfaceBasicAuthenticationDetailsProvider
- Returns:
- The pass phrase, or null if not applicable
-
getPassphraseCharacters
public char[] getPassphraseCharacters()
Returns the optional pass phrase for the (encrypted) private key, as a character array.- Specified by:
getPassphraseCharacters
in interfaceBasicAuthenticationDetailsProvider
- Returns:
- The pass phrase as character array, or null if not applicable
-
-