CachingKeyResolver Class

  • java.lang.Object
    • IKeyResolver
      • com.microsoft.azure.keyvault.extensions.CachingKeyResolver

public class CachingKeyResolver implements IKeyResolver

The key resolver that caches the key after resolving to IKey.

Constructor Summary

Constructor Description
CachingKeyResolver(int capacity, final IKeyResolver keyResolver)

Constructor.

Method Summary

Modifier and Type Method and Description
ListenableFuture<IKey> resolveKeyAsync(String kid)

Retrieves an IKey implementation for the specified key identifier. Implementations should check the format of the kid to ensure that it is recognized. Null, rather than an exception, should be returned for unrecognized key identifiers to enable chaining of key resolvers.

Constructor Details

CachingKeyResolver

public CachingKeyResolver(int capacity, final IKeyResolver keyResolver)

Constructor.

Parameters:

capacity - the cache size
keyResolver - the key resolver

Method Details

resolveKeyAsync

public ListenableFuture resolveKeyAsync(String kid)

Retrieves an IKey implementation for the specified key identifier. Implementations should check the format of the kid to ensure that it is recognized. Null, rather than an exception, should be returned for unrecognized key identifiers to enable chaining of key resolvers.

Overrides:

CachingKeyResolver.resolveKeyAsync(String kid)

Parameters:

kid - The key identifier to resolve.

Returns:

A ListenableFuture containing the resolved IKey

Applies to