public class ChainedKeyProvider extends Object implements KeyProvider<PublicKey>
Looks up keys sequentially in a given list of key providers.
Note that the current implementation doesn't perform any caching, in particular it doesn't remember where the key was found last time. That may reduce the effectiveness of the provider's http cache if it comes later in the keyProviderChain.
| Modifier and Type | Method and Description |
|---|---|
static KeyProvider<PublicKey> |
createChainedKeyProvider(List<KeyProvider<PublicKey>> keyProviderChain)
Create a chained key provider representing a given list of key repository providers.
|
PublicKey |
getKey(ValidatedKeyId validatedKeyId)
Provides a Key for a validated key identifier.
|
List<KeyProvider<PublicKey>> |
getKeyProviderChain() |
String |
toString() |
public static KeyProvider<PublicKey> createChainedKeyProvider(List<KeyProvider<PublicKey>> keyProviderChain)
keyProviderChain - set of chained key repository providers in orderpublic PublicKey getKey(ValidatedKeyId validatedKeyId) throws CannotRetrieveKeyException
KeyProvidergetKey in interface KeyProvider<PublicKey>validatedKeyId - the validated keyId of interest which is safe from directory traversalCannotRetrieveKeyException - if the key couldn't be retrieved or found.public List<KeyProvider<PublicKey>> getKeyProviderChain()
Copyright © 2017 Atlassian. All rights reserved.