
public abstract class IdentityCredentials extends Object implements Iterable<Credential>, CredentialSource
| Modifier and Type | Field and Description |
|---|---|
static IdentityCredentials |
NONE
The empty credentials object.
|
| Modifier and Type | Method and Description |
|---|---|
<C extends Credential,R> |
applyToCredential(Class<C> credentialType,
Function<C,R> function)
Apply the given function to the acquired credential, if it is set and of the given type.
|
<C extends Credential,R> |
applyToCredential(Class<C> credentialType,
String algorithmName,
AlgorithmParameterSpec parameterSpec,
Function<C,R> function)
Apply the given function to the acquired credential, if it is set and of the given type and algorithm.
|
<C extends Credential,R> |
applyToCredential(Class<C> credentialType,
String algorithmName,
Function<C,R> function)
Apply the given function to the acquired credential, if it is set and of the given type and algorithm.
|
boolean |
canVerify(Class<? extends Evidence> evidenceClass,
String algorithmName)
Test whether some of the credentials in this set can verify an evidence of given class and algorithm name.
|
boolean |
canVerify(Evidence evidence)
Test whether some of the credentials in this set can verify an evidence.
|
boolean |
contains(Class<? extends Credential> credentialType)
Determine whether a credential of the given type is present in this set.
|
boolean |
contains(Class<? extends Credential> credentialType,
String algorithmName)
Determine whether a credential of the given type and algorithm are present in this set.
|
abstract boolean |
contains(Class<? extends Credential> credentialType,
String algorithmName,
AlgorithmParameterSpec parameterSpec)
Determine whether a credential of the given type and algorithm are present in this set.
|
boolean |
containsMatching(Credential credential)
Determine whether a credential of the type, algorithm, and parameters of the given credential is present in this set.
|
<C extends Credential> |
getCredential(Class<C> credentialType)
Acquire a credential of the given type.
|
<C extends Credential> |
getCredential(Class<C> credentialType,
String algorithmName)
Acquire a credential of the given type and algorithm name.
|
abstract <C extends Credential> |
getCredential(Class<C> credentialType,
String algorithmName,
AlgorithmParameterSpec parameterSpec)
Acquire a credential of the given type and algorithm name.
|
SupportLevel |
getCredentialAcquireSupport(Class<? extends Credential> credentialType)
Determine whether a given credential is definitely obtainable, possibly obtainable, or definitely not obtainable.
|
SupportLevel |
getCredentialAcquireSupport(Class<? extends Credential> credentialType,
String algorithmName)
Determine whether a given credential is definitely obtainable, possibly obtainable, or definitely not obtainable.
|
SupportLevel |
getCredentialAcquireSupport(Class<? extends Credential> credentialType,
String algorithmName,
AlgorithmParameterSpec parameterSpec)
Determine whether a given credential is definitely obtainable, possibly obtainable, or definitely not obtainable.
|
abstract int |
size()
Get the size of this credential set.
|
Spliterator<Credential> |
spliterator()
Get a
Spliterator for this credential set. |
boolean |
verify(Evidence evidence)
Verify the given evidence.
|
abstract IdentityCredentials |
with(IdentityCredentials other)
Return a copy of this credential set with the given credential set added to it.
|
abstract IdentityCredentials |
withCredential(Credential credential)
Return a copy of this credential set, but with the given credential added to it.
|
IdentityCredentials |
without(Class<? extends Credential> credentialType)
Return a copy of this credential set without any credentials of the given type.
|
IdentityCredentials |
without(Class<? extends Credential> credentialType,
String algorithmName)
Return a copy of this credential set without any credentials of the given type and algorithm name.
|
IdentityCredentials |
without(Class<? extends Credential> credentialType,
String algorithmName,
AlgorithmParameterSpec parameterSpec)
Return a copy of this credential set without any credentials of the given type, algorithm name and
parameter spec.
|
<C extends Credential> |
without(Class<C> credentialType,
Predicate<? super C> predicate)
Return a copy of this credential set without any credentials of the given type that match the predicate.
|
abstract IdentityCredentials |
without(Predicate<? super Credential> predicate)
Return a copy of this credential set without any credentials that match the predicate.
|
IdentityCredentials |
withoutMatching(Credential credential)
Return a copy of this credential set without any credentials with a type, algorithm name, and parameters matching that of the
given credential.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfromSecurityFactory, withpublic static final IdentityCredentials NONE
public final boolean contains(Class<? extends Credential> credentialType)
credentialType - the credential type class (must not be null)true if a matching credential is contained in this set, false otherwisepublic final SupportLevel getCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)
CredentialSourcegetCredentialAcquireSupport in interface CredentialSourcecredentialType - the credential type class (must not be null)algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type does
not support algorithm namesparameterSpec - the algorithm parameters to match, or null if any parameters are acceptable or the credential type
does not support algorithm parametersnull)public final SupportLevel getCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName)
CredentialSourcegetCredentialAcquireSupport in interface CredentialSourcecredentialType - the credential type class (must not be null)algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type
does
not support algorithm namesnull)public final SupportLevel getCredentialAcquireSupport(Class<? extends Credential> credentialType)
CredentialSourcegetCredentialAcquireSupport in interface CredentialSourcecredentialType - the credential type class (must not be null)null)public abstract boolean contains(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)
credentialType - the credential type class (must not be null)algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type
does not support algorithm namesparameterSpec - the parameter specification or null if any parameter specification is acceptabletrue if a matching credential is contained in this set, false otherwisepublic final boolean contains(Class<? extends Credential> credentialType, String algorithmName)
credentialType - the credential type class (must not be null)algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type
does not support algorithm namestrue if a matching credential is contained in this set, false otherwisepublic final boolean containsMatching(Credential credential)
credential - the credential to check against (must not be null)true if a matching credential is contained in this set, false otherwisepublic final <C extends Credential> C getCredential(Class<C> credentialType)
getCredential in interface CredentialSourceC - the credential typecredentialType - the credential type class (must not be null)null if no such credential existspublic final <C extends Credential> C getCredential(Class<C> credentialType, String algorithmName)
getCredential in interface CredentialSourceC - the credential typecredentialType - the credential type class (must not be null)algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type
does not support algorithm namesnull if no such credential existspublic abstract <C extends Credential> C getCredential(Class<C> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)
getCredential in interface CredentialSourceC - the credential typecredentialType - the credential type class (must not be null)algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type
does not support algorithm namesparameterSpec - the parameter specification or null if any parameter specification is acceptablenull if no such credential existspublic final <C extends Credential,R> R applyToCredential(Class<C> credentialType, Function<C,R> function)
applyToCredential in interface CredentialSourceC - the credential typeR - the return typecredentialType - the credential type class (must not be null)function - the function to apply (must not be null)null if the criteria are not metpublic final <C extends Credential,R> R applyToCredential(Class<C> credentialType, String algorithmName, Function<C,R> function)
applyToCredential in interface CredentialSourceC - the credential typeR - the return typecredentialType - the credential type class (must not be null)algorithmName - the algorithm namefunction - the function to apply (must not be null)null if the criteria are not metpublic <C extends Credential,R> R applyToCredential(Class<C> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec, Function<C,R> function)
applyToCredential in interface CredentialSourceC - the credential typeR - the return typecredentialType - the credential type class (must not be null)algorithmName - the algorithm namefunction - the function to apply (must not be null)parameterSpec - the parameter specification or null if any parameter specification is acceptablenull if the criteria are not metpublic abstract IdentityCredentials withCredential(Credential credential)
credential - the credential to append (must not be null)null)public abstract IdentityCredentials with(IdentityCredentials other)
other - the credential set to append (must not be null)null)public IdentityCredentials withoutMatching(Credential credential)
credential - the credential to match against (must not be null)null)public final IdentityCredentials without(Class<? extends Credential> credentialType)
without in interface CredentialSourcecredentialType - the credential type to remove (must not be null)null)public final IdentityCredentials without(Class<? extends Credential> credentialType, String algorithmName)
without in interface CredentialSourcecredentialType - the credential type to remove (must not be null)algorithmName - the algorithm name to remove, or null to match any algorithm namenull)public IdentityCredentials without(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)
without in interface CredentialSourcecredentialType - the credential type to remove (must not be null)algorithmName - the algorithm name to remove, or null to match any algorithm nameparameterSpec - the parameter spec to remove, or null to match any parameter specnull)public abstract IdentityCredentials without(Predicate<? super Credential> predicate)
predicate - the predicate to test (must not be null)null)public final <C extends Credential> IdentityCredentials without(Class<C> credentialType, Predicate<? super C> predicate)
C - the credential typecredentialType - the credential type classpredicate - the predicate to test (must not be null)null)public Spliterator<Credential> spliterator()
Spliterator for this credential set.spliterator in interface Iterable<Credential>null)public boolean canVerify(Class<? extends Evidence> evidenceClass, String algorithmName)
evidenceClass - the class of the evidence (must not be null)algorithmName - the algorithm name (may be null if the type of evidence does not support algorithm names)true if the evidence can be verifiedpublic boolean canVerify(Evidence evidence)
evidence - the evidence (must not be null)true if the evidence can be verifiedpublic boolean verify(Evidence evidence)
evidence - the evidence to verify (must not be null)true if the evidence is verified, false otherwisepublic abstract int size()
Copyright © 2020 JBoss by Red Hat. All rights reserved.