|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.xml.security.credential.AbstractCredentialResolver
org.opensaml.xml.security.credential.AbstractCriteriaFilteringCredentialResolver
org.opensaml.xml.security.keyinfo.BasicProviderKeyInfoCredentialResolver
org.opensaml.xml.security.keyinfo.LocalKeyInfoCredentialResolver
public class LocalKeyInfoCredentialResolver
A simple specialization of BasicProviderKeyInfoCredentialResolver
which is capable of using information from a KeyInfo to resolve
local credentials from a supplied CredentialResolver which manages local credentials.
The local credential resolver supplied should manage and return credentials which contain either a secret (symmetric) key or the private key half of a key pair.
A typical use case for this class would be as a resolver of decryption keys,
such as is needed by Decrypter.
Resolution proceeds as follows:
BasicProviderKeyInfoCredentialResolver
resolution process which is not a local credential will be removed
from the effective set of credentials to be returned. Note that a configured
KeyInfoProvider may have itself already resolved local credentials using a
different mechanism. These will not be removed.KeyInfoResolutionContext.getKeyNames() will also
be used as resolution criteria for local credentials and the resultant credentials
added to the set to be returned.
| Constructor Summary | |
|---|---|
LocalKeyInfoCredentialResolver(java.util.List<KeyInfoProvider> keyInfoProviders,
CredentialResolver localCredentialResolver)
Constructor. |
|
| Method Summary | |
|---|---|
CredentialResolver |
getLocalCredentialResolver()
Get the resolver for local credentials. |
protected boolean |
isLocalCredential(Credential credential)
Determine whether the credential is a local credential. |
protected void |
postProcess(KeyInfoResolutionContext kiContext,
CriteriaSet criteriaSet,
java.util.List<Credential> credentials)
Hook for subclasses to do post-processing of the credential set after all KeyInfo children have been processed. |
protected java.util.Collection<? extends Credential> |
resolveByKeyName(java.lang.String keyName)
Resolve credentials from local resolver using key name criteria. |
protected java.util.Collection<? extends Credential> |
resolveByPublicKey(java.security.PublicKey publicKey)
Resolve credentials from local resolver using public key criteria. |
| Methods inherited from class org.opensaml.xml.security.keyinfo.BasicProviderKeyInfoCredentialResolver |
|---|
buildBasicCredential, extractKeyValue, getProviders, initResolutionContext, postProcessEmptyCredentials, processKeyInfoChild, processKeyInfoChildren, resolveFromSource, resolveKeyValue |
| Methods inherited from class org.opensaml.xml.security.credential.AbstractCriteriaFilteringCredentialResolver |
|---|
isMeetAllCriteria, isUnevaluableSatisfies, resolve, setMeetAllCriteria, setUnevaluableSatisfies |
| Methods inherited from class org.opensaml.xml.security.credential.AbstractCredentialResolver |
|---|
resolveSingle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opensaml.xml.security.Resolver |
|---|
resolve, resolveSingle |
| Constructor Detail |
|---|
public LocalKeyInfoCredentialResolver(java.util.List<KeyInfoProvider> keyInfoProviders,
CredentialResolver localCredentialResolver)
keyInfoProviders - the list of KeyInfoProvider's to use in this resolverlocalCredentialResolver - resolver of local credentials| Method Detail |
|---|
public CredentialResolver getLocalCredentialResolver()
protected void postProcess(KeyInfoResolutionContext kiContext,
CriteriaSet criteriaSet,
java.util.List<Credential> credentials)
throws SecurityException
postProcess in class BasicProviderKeyInfoCredentialResolverkiContext - KeyInfo resolution contextcriteriaSet - the credential criteria used to resolve credentialscredentials - the list which will store the resolved credentials
SecurityException - thrown if there is an error during processingprotected boolean isLocalCredential(Credential credential)
credential - the credential to evaluate
protected java.util.Collection<? extends Credential> resolveByKeyName(java.lang.String keyName)
throws SecurityException
keyName - the key name criteria
SecurityException - thrown if there is a problem resolving credentials from the
local credential resolver
protected java.util.Collection<? extends Credential> resolveByPublicKey(java.security.PublicKey publicKey)
throws SecurityException
publicKey - the public key criteria
SecurityException - thrown if there is a problem resolving credentials from the
local credential resolver
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||