
public final class PasswordCredential extends Object implements AlgorithmCredential
NO_CREDENTIALS| Constructor and Description |
|---|
PasswordCredential(Password password)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canVerify(Class<? extends Evidence> evidenceClass,
String algorithmName)
Determine whether this credential can, generally speaking, verify the given evidence type.
|
static boolean |
canVerifyEvidence(Class<? extends Evidence> evidenceClass,
String algorithmName)
Determine whether this credential type can, generally speaking, verify the given evidence type.
|
PasswordCredential |
clone()
Creates and returns a copy of this
Credential. |
boolean |
equals(Object obj) |
String |
getAlgorithm()
Get the algorithm name associated with this credential (will never be
null). |
<P extends AlgorithmParameterSpec> |
getParameters(Class<P> paramSpecClass)
Get the algorithm parameters of the given type from this credential.
|
Password |
getPassword()
Get the password.
|
<P extends Password> |
getPassword(Class<P> type)
Get the password if it is of the given type; otherwise return
null. |
int |
hashCode() |
boolean |
impliesParameters(AlgorithmParameterSpec parameterSpec)
Determine whether this credential implies the given parameters.
|
boolean |
impliesSameParameters(AlgorithmCredential other)
Determine whether the other credential's parameters are implied by this one.
|
boolean |
supportsParameters(Class<? extends AlgorithmParameterSpec> paramSpecClass)
Determine whether this credential instance supports the given algorithm parameter type.
|
boolean |
verify(Supplier<Provider[]> providerSupplier,
Evidence evidence)
Verify the given evidence.
|
finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetParameters, matches, matches, matches, supportsParameterscanVerify, castAndApply, castAndApply, castAndApply, castAs, castAs, castAs, fromKeyStoreEntry, verifypublic PasswordCredential(Password password)
password - the password (must not be null)public Password getPassword()
null)public <P extends Password> P getPassword(Class<P> type)
null.P - the password typetype - the password type classnull if the password is not of the given typepublic String getAlgorithm()
AlgorithmCredentialnull).getAlgorithm in interface AlgorithmCredentialpublic boolean supportsParameters(Class<? extends AlgorithmParameterSpec> paramSpecClass)
AlgorithmCredentialsupportsParameters in interface AlgorithmCredentialparamSpecClass - the parameter specification class (must not be null)true if the parameter type is supported, false otherwisepublic <P extends AlgorithmParameterSpec> P getParameters(Class<P> paramSpecClass)
AlgorithmCredentialgetParameters in interface AlgorithmCredentialparamSpecClass - the parameter specification class (must not be null)null if no parameters are present or available or the given type
was not supported by this credentialpublic boolean impliesParameters(AlgorithmParameterSpec parameterSpec)
AlgorithmCredentialfalse always.impliesParameters in interface AlgorithmCredentialparameterSpec - the parameters to test for (must not be null)true if the given parameters match this credential, false otherwisepublic boolean impliesSameParameters(AlgorithmCredential other)
AlgorithmCredentialimpliesSameParameters in interface AlgorithmCredentialother - the other credential (must not be null)true if the credentials have matching parameters, false otherwisepublic boolean canVerify(Class<? extends Evidence> evidenceClass, String algorithmName)
CredentialcanVerify in interface CredentialevidenceClass - the evidence type (must not be null)algorithmName - the evidence algorithm name (may be null if the type of evidence does not support
algorithm names)true if the evidence can be verified by this credential, false otherwisepublic static boolean canVerifyEvidence(Class<? extends Evidence> evidenceClass, String algorithmName)
evidenceClass - the evidence type (must not be null)algorithmName - the evidence algorithm name (may be null if the type of evidence does not support
algorithm names)true if the evidence can be verified by this credential, false otherwisepublic boolean verify(Supplier<Provider[]> providerSupplier, Evidence evidence)
Credentialverify in interface CredentialproviderSupplier - the provider supplier to use for verification purposesevidence - the evidence to verify (must not be null)true if the evidence is verified, false otherwisepublic PasswordCredential clone()
AlgorithmCredentialCredential.clone in interface AlgorithmCredentialclone in interface Credentialclone in class ObjectCredential.Copyright © 2020 JBoss by Red Hat. All rights reserved.