public class UsernamePasswordKeyStoreBuilder extends Object implements KeyStoreBuilder<Credential>
| Constructor and Description |
|---|
UsernamePasswordKeyStoreBuilder() |
| Modifier and Type | Method and Description |
|---|---|
String |
buildAlias(String alias)
Build an alias based on the input provided.
|
Credential |
credentialToKey(Credential credential)
Convert a credential to a key value.
|
Credential |
getKeyFromKeyStore(String alias, oracle.security.pki.OracleSecretStore secretStore)
Retrieves a key form a key store.
|
List<Credential> |
getKeysFromKeyStore(oracle.security.pki.OracleSecretStore secretStore)
Retrieves all the keys from the key store.
|
Credential |
keyToCredential(Credential key)
Converts a key to a credential.
|
void |
persistKeyToKeyStore(String alias, Credential key, oracle.security.pki.OracleSecretStore secretStore)
Saves a key to a key store.
|
void |
removeKeyFromKeyStore(String alias, oracle.security.pki.OracleSecretStore secretStore)
Removes a key form a key store.
|
public String buildAlias(String alias)
KeyStoreBuilderbuildAlias in interface KeyStoreBuilder<Credential>alias - base alias namepublic Credential credentialToKey(Credential credential)
KeyStoreBuildercredentialToKey in interface KeyStoreBuilder<Credential>credential - the credentialpublic List<Credential> getKeysFromKeyStore(oracle.security.pki.OracleSecretStore secretStore) throws FMWCredentialsException
KeyStoreBuildergetKeysFromKeyStore in interface KeyStoreBuilder<Credential>secretStore - the key store.FMWCredentialsException - if an error occurspublic Credential getKeyFromKeyStore(String alias, oracle.security.pki.OracleSecretStore secretStore) throws FMWCredentialsException
KeyStoreBuildergetKeyFromKeyStore in interface KeyStoreBuilder<Credential>alias - the key to be retrievedsecretStore - the key storeFMWCredentialsException - if an error occurspublic Credential keyToCredential(Credential key) throws FMWCredentialsException
KeyStoreBuilderkeyToCredential in interface KeyStoreBuilder<Credential>key - the key to be convertedFMWCredentialsException - if an error occurspublic void persistKeyToKeyStore(String alias, Credential key, oracle.security.pki.OracleSecretStore secretStore) throws FMWCredentialsException
KeyStoreBuilderpersistKeyToKeyStore in interface KeyStoreBuilder<Credential>alias - the key aliaskey - the key to be storedsecretStore - the store to be used in saving the keyFMWCredentialsException - if an error occurspublic void removeKeyFromKeyStore(String alias, oracle.security.pki.OracleSecretStore secretStore) throws FMWCredentialsException
KeyStoreBuilderremoveKeyFromKeyStore in interface KeyStoreBuilder<Credential>alias - the alias identifying the key to be removedsecretStore - the store to be usedFMWCredentialsException - if an error occurs