public final class CredentialUtils extends Object
Utility class with helper methods for the Credential API.
| Constructor and Description |
|---|
CredentialUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends CredentialStorage> |
getCurrentCredential(IdentityContext context,
Account agent,
CredentialStore<?> store,
Class<T> storageClass)
Returns the current credential for the given
Agent. |
static boolean |
isCredentialExpired(CredentialStorage credentialStorage)
Checks if the given
CredentialStorage holds an expired credential. |
static boolean |
isCurrentCredential(CredentialStorage credential)
Checks if the specified
CredentialStorage maps to the current credential. |
static boolean |
isLastCredentialExpired(IdentityContext context,
Account agent,
CredentialStore<?> store,
Class<? extends CredentialStorage> storageClass) |
public static boolean isCurrentCredential(CredentialStorage credential)
Checks if the specified CredentialStorage maps to the current credential.
credential - public static boolean isLastCredentialExpired(IdentityContext context, Account agent, CredentialStore<?> store, Class<? extends CredentialStorage> storageClass)
public static <T extends CredentialStorage> T getCurrentCredential(IdentityContext context, Account agent, CredentialStore<?> store, Class<T> storageClass)
Returns the current credential for the given Agent.
agent - store - storageClass - public static boolean isCredentialExpired(CredentialStorage credentialStorage)
Checks if the given CredentialStorage holds an expired credential.
credentialStorage - Copyright © 2015. All rights reserved.