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 classAbstractRequestingAuthenticationDetailsProvider.Builder<B extends AbstractRequestingAuthenticationDetailsProvider.Builder<B>>Base class for builders.protected static classAbstractRequestingAuthenticationDetailsProvider.CachingSessionKeySupplierHelper 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 FederationClientfederationClientprotected AbstractRequestingAuthenticationDetailsProvider.CachingSessionKeySuppliersessionKeySupplier
-
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 StringgetKeyId()Returns the keyId used to sign requests.StringgetPassPhrase()Deprecated.char[]getPassphraseCharacters()Returns the optional pass phrase for the (encrypted) private key, as a character array.InputStreamgetPrivateKey()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:BasicAuthenticationDetailsProviderReturns the keyId used to sign requests.- Specified by:
getKeyIdin interfaceBasicAuthenticationDetailsProvider- Returns:
- The keyId.
-
getPrivateKey
public InputStream getPrivateKey()
Description copied from interface:BasicAuthenticationDetailsProviderReturns a new InputStream to the private key.This stream should be closed by the caller, implementations should return new streams each time.
- Specified by:
getPrivateKeyin interfaceBasicAuthenticationDetailsProvider- Returns:
- A new InputStream.
-
getPassPhrase
@Deprecated public String getPassPhrase()
Deprecated.Description copied from interface:BasicAuthenticationDetailsProviderReturns the optional pass phrase for the (encrypted) private key.- Specified by:
getPassPhrasein 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:
getPassphraseCharactersin interfaceBasicAuthenticationDetailsProvider- Returns:
- The pass phrase as character array, or null if not applicable
-
-