Class AbstractBasicCredentialFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
net.shibboleth.ext.spring.factory.AbstractComponentAwareFactoryBean<T>
net.shibboleth.idp.profile.spring.factory.AbstractCredentialFactoryBean<BasicCredential>
net.shibboleth.idp.profile.spring.factory.AbstractBasicCredentialFactoryBean
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<BasicCredential>
,InitializingBean
- Direct Known Subclasses:
BasicInlineCredentialFactoryBean
,BasicResourceCredentialFactoryBean
public abstract class AbstractBasicCredentialFactoryBean
extends AbstractCredentialFactoryBean<BasicCredential>
A factory bean to collect information to do with a
BasicCredential
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Form of encoding for SecretKey info. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Logger
Log.private String
The SecretKey algorithm.The SecretKey encoding used.Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
decodeSecretKey
(byte[] data) Decode the SecretKey data, based on the specified encoding.protected byte[]
decodeSecretKey
(String data) Decode the SecretKey data, based on the specified encoding.protected BasicCredential
Class<?>
protected abstract PrivateKey
Get the configured Private key.protected abstract PublicKey
return the configured Public Key.protected abstract SecretKey
return the configured Secret Key.Get the algorithm for the SecretKey.Get the SecretKey encoding.void
setSecretKeyAlgorithm
(String algorithm) Set the algorithm for the SecretKey.void
Set the SecretKey encoding.Methods inherited from class net.shibboleth.idp.profile.spring.factory.AbstractCredentialFactoryBean
getConfigDescription, getEntityID, getKeyNames, getPrivateKeyPassword, getUsageType, setConfigDescription, setEntityID, setKeyNames, setPrivateKeyPassword, setUsageType
Methods inherited from class net.shibboleth.ext.spring.factory.AbstractComponentAwareFactoryBean
createInstance, destroyInstance
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
log
private final org.slf4j.Logger logLog. -
secretKeyAlgorithm
The SecretKey algorithm. -
secretKeyEncoding
The SecretKey encoding used.
-
-
Constructor Details
-
AbstractBasicCredentialFactoryBean
public AbstractBasicCredentialFactoryBean()
-
-
Method Details
-
decodeSecretKey
Decode the SecretKey data, based on the specified encoding.- Parameters:
data
- the Secret key data- Returns:
- the decoded SecretKey byte array
-
decodeSecretKey
protected byte[] decodeSecretKey(byte[] data) Decode the SecretKey data, based on the specified encoding.- Parameters:
data
- the Secret key data- Returns:
- the decoded SecretKey byte array
-
doCreateInstance
- Specified by:
doCreateInstance
in classAbstractComponentAwareFactoryBean<BasicCredential>
- Throws:
Exception
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<BasicCredential>
- Specified by:
getObjectType
in classAbstractFactoryBean<BasicCredential>
-
getSecretKeyAlgorithm
Get the algorithm for the SecretKey.- Returns:
- Returns the SecretKey algorithm
-
setSecretKeyAlgorithm
Set the algorithm for the SecretKey.- Parameters:
algorithm
- The algorithm to set.
-
getSecretKeyEncoding
Get the SecretKey encoding. Defaults to: base64.- Returns:
- the encoding
-
setSecretKeyEncoding
public void setSecretKeyEncoding(@Nonnull AbstractBasicCredentialFactoryBean.SecretKeyEncoding encoding) Set the SecretKey encoding. Defaults to: base64- Parameters:
encoding
- the new encoding
-
getPublicKey
return the configured Public Key.- Returns:
- the key, or none if not configured.
-
getPrivateKey
Get the configured Private key.- Returns:
- the key or null if non configured
-
getSecretKey
return the configured Secret Key.- Returns:
- the key, or none if not configured.
-