|
Spring Security SAML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.security.saml.key.JKSKeyManager
public class JKSKeyManager
Class provides access to private and trusted keys for SAML Extension configuration. Keys are stored in the underlaying KeyStore object. Class also provides additional convenience methods for loading of certificates and public keys.
Constructor Summary | |
---|---|
JKSKeyManager(KeyStore keyStore,
Map<String,String> passwords,
String defaultKey)
Default constructor which uses an existing KeyStore instance for loading of credentials. |
|
JKSKeyManager(org.springframework.core.io.Resource storeFile,
String storePass,
Map<String,String> passwords,
String defaultKey)
Default constructor which instantiates a new KeyStore used to load all credentials. |
Method Summary | |
---|---|
Set<String> |
getAvailableCredentials()
Method provides list of all credentials available in the storage. |
X509Certificate |
getCertificate(String alias)
Returns certificate with the given alias from the keystore. |
org.opensaml.xml.security.credential.Credential |
getCredential(String keyName)
Returns Credential object used to sign the messages issued by this entity. |
org.opensaml.xml.security.credential.Credential |
getDefaultCredential()
Returns Credential object used to sign the messages issued by this entity. |
String |
getDefaultCredentialName()
Method provides name of the credential which should be used by default when no other is specified. |
KeyStore |
getKeyStore()
|
PublicKey |
getPublicKey(String alias)
Returns public key with the given alias |
Iterable<org.opensaml.xml.security.credential.Credential> |
resolve(org.opensaml.xml.security.CriteriaSet criteriaSet)
|
org.opensaml.xml.security.credential.Credential |
resolveSingle(org.opensaml.xml.security.CriteriaSet criteriaSet)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JKSKeyManager(KeyStore keyStore, Map<String,String> passwords, String defaultKey)
keyStore
- key store to usepasswords
- passwords used to access private keysdefaultKey
- default keypublic JKSKeyManager(org.springframework.core.io.Resource storeFile, String storePass, Map<String,String> passwords, String defaultKey)
storeFile
- file pointing to the JKS keystorestorePass
- password to access the keystorepasswords
- passwords used to access private keysdefaultKey
- default keyMethod Detail |
---|
public X509Certificate getCertificate(String alias)
getCertificate
in interface KeyManager
alias
- alias of certificate to find
public PublicKey getPublicKey(String alias)
alias
- alias of the key to find
public Iterable<org.opensaml.xml.security.credential.Credential> resolve(org.opensaml.xml.security.CriteriaSet criteriaSet) throws org.opensaml.xml.security.SecurityException
resolve
in interface org.opensaml.xml.security.Resolver<org.opensaml.xml.security.credential.Credential,org.opensaml.xml.security.CriteriaSet>
org.opensaml.xml.security.SecurityException
public org.opensaml.xml.security.credential.Credential resolveSingle(org.opensaml.xml.security.CriteriaSet criteriaSet) throws org.opensaml.xml.security.SecurityException
resolveSingle
in interface org.opensaml.xml.security.Resolver<org.opensaml.xml.security.credential.Credential,org.opensaml.xml.security.CriteriaSet>
org.opensaml.xml.security.SecurityException
public org.opensaml.xml.security.credential.Credential getCredential(String keyName)
getCredential
in interface KeyManager
keyName
- name of the key to use, in case of null default key is used
public org.opensaml.xml.security.credential.Credential getDefaultCredential()
getDefaultCredential
in interface KeyManager
public String getDefaultCredentialName()
KeyManager
getDefaultCredentialName
in interface KeyManager
public Set<String> getAvailableCredentials()
KeyManager
getAvailableCredentials
in interface KeyManager
public KeyStore getKeyStore()
|
Spring Security SAML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |