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 aBasicCredential.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractBasicCredentialFactoryBean.SecretKeyEncodingForm of encoding for SecretKey info.
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogLog.private StringsecretKeyAlgorithmThe SecretKey algorithm.private AbstractBasicCredentialFactoryBean.SecretKeyEncodingsecretKeyEncodingThe 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 Constructor Description AbstractBasicCredentialFactoryBean()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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 BasicCredentialdoCreateInstance()Class<?>getObjectType()protected abstract PrivateKeygetPrivateKey()Get the configured Private key.protected abstract PublicKeygetPublicKey()return the configured Public Key.protected abstract SecretKeygetSecretKey()return the configured Secret Key.StringgetSecretKeyAlgorithm()Get the algorithm for the SecretKey.AbstractBasicCredentialFactoryBean.SecretKeyEncodinggetSecretKeyEncoding()Get the SecretKey encoding.voidsetSecretKeyAlgorithm(String algorithm)Set the algorithm for the SecretKey.voidsetSecretKeyEncoding(AbstractBasicCredentialFactoryBean.SecretKeyEncoding encoding)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 Detail
-
log
private final org.slf4j.Logger log
Log.
-
secretKeyAlgorithm
@Nullable private String secretKeyAlgorithm
The SecretKey algorithm.
-
secretKeyEncoding
@Nullable private AbstractBasicCredentialFactoryBean.SecretKeyEncoding secretKeyEncoding
The SecretKey encoding used.
-
-
Method Detail
-
decodeSecretKey
protected byte[] decodeSecretKey(String data)
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
protected BasicCredential doCreateInstance() throws Exception
- Specified by:
doCreateInstancein classAbstractComponentAwareFactoryBean<BasicCredential>- Throws:
Exception
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectTypein interfaceFactoryBean<BasicCredential>- Specified by:
getObjectTypein classAbstractFactoryBean<BasicCredential>
-
getSecretKeyAlgorithm
@Nullable public String getSecretKeyAlgorithm()
Get the algorithm for the SecretKey.- Returns:
- Returns the SecretKey algorithm
-
setSecretKeyAlgorithm
public void setSecretKeyAlgorithm(@Nonnull String algorithm)Set the algorithm for the SecretKey.- Parameters:
algorithm- The algorithm to set.
-
getSecretKeyEncoding
public AbstractBasicCredentialFactoryBean.SecretKeyEncoding 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
@Nullable protected abstract PublicKey getPublicKey()
return the configured Public Key.- Returns:
- the key, or none if not configured.
-
getPrivateKey
@Nullable protected abstract PrivateKey getPrivateKey()
Get the configured Private key.- Returns:
- the key or null if non configured
-
getSecretKey
@Nullable protected abstract SecretKey getSecretKey()
return the configured Secret Key.- Returns:
- the key, or none if not configured.
-
-