Package com.oracle.bmc.auth
Class AbstractRequestingAuthenticationDetailsProvider.CachingSessionKeySupplier
- java.lang.Object
-
- com.oracle.bmc.auth.AbstractRequestingAuthenticationDetailsProvider.CachingSessionKeySupplier
-
- All Implemented Interfaces:
SessionKeySupplier
- Enclosing class:
- AbstractRequestingAuthenticationDetailsProvider
protected static class AbstractRequestingAuthenticationDetailsProvider.CachingSessionKeySupplier extends Object implements SessionKeySupplier
Helper class to cache the private key as bytes so we don’t have to parse it every time.The key only changes during calls to refresh.
All methods in this class that are called outside of this class should be synchronized.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCachingSessionKeySupplier(SessionKeySupplier delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description KeyPairgetKeyPair()Returns the current RSA key pair.RSAPrivateKeygetPrivateKey()Deprecated.protected byte[]getPrivateKeyBytes()RSAPublicKeygetPublicKey()Deprecated.voidrefreshKeys()If the auth service-issued security token expires, the federation client will try to re-generate a new set of keys by calling this method.
-
-
-
Constructor Detail
-
CachingSessionKeySupplier
protected CachingSessionKeySupplier(SessionKeySupplier delegate)
-
-
Method Detail
-
getKeyPair
public KeyPair getKeyPair()
Description copied from interface:SessionKeySupplierReturns the current RSA key pair.- Specified by:
getKeyPairin interfaceSessionKeySupplier- Returns:
- The RSA key pair.
-
getPublicKey
@Deprecated public RSAPublicKey getPublicKey()
Deprecated.Description copied from interface:SessionKeySupplierGets the public key- Specified by:
getPublicKeyin interfaceSessionKeySupplier- Returns:
- the public key, not null
-
getPrivateKey
@Deprecated public RSAPrivateKey getPrivateKey()
Deprecated.Description copied from interface:SessionKeySupplierGets the private key- Specified by:
getPrivateKeyin interfaceSessionKeySupplier- Returns:
- the private key, not null
-
refreshKeys
public void refreshKeys()
Description copied from interface:SessionKeySupplierIf the auth service-issued security token expires, the federation client will try to re-generate a new set of keys by calling this method.The implementer should create a new pair of keys for security reasons.
Refreshing keys should not be a long-running blocking call. You can refresh keys in an async thread and return from this method immediately. When the async process is done refreshing the keys, the client code will automatically pick up the latest set of keys and update the security token accordingly
- Specified by:
refreshKeysin interfaceSessionKeySupplier
-
getPrivateKeyBytes
protected byte[] getPrivateKeyBytes()
-
-