public class FilePrivateKeyProvider extends Object implements KeyProvider<PrivateKey>
| Constructor and Description |
|---|
FilePrivateKeyProvider(File baseDirectory,
KeyReader keyReader)
Creates a new instance of
FilePrivateKeyProvider. |
| Modifier and Type | Method and Description |
|---|---|
PrivateKey |
getKey(ValidatedKeyId validatedKeyId)
Provides a Key for a validated key identifier.
|
String |
toString() |
public FilePrivateKeyProvider(File baseDirectory, KeyReader keyReader)
FilePrivateKeyProvider.baseDirectory - the base directory in filesystem where private keys are storedkeyReader - the key reader to use for reading private keyspublic PrivateKey getKey(ValidatedKeyId validatedKeyId) throws CannotRetrieveKeyException
KeyProvidergetKey in interface KeyProvider<PrivateKey>validatedKeyId - the validated keyId of interest which is safe from directory traversalCannotRetrieveKeyException - if the key couldn't be retrieved or found.Copyright © 2017 Atlassian. All rights reserved.