Class BasicJWKCredentialFactoryBean
- java.lang.Object
-
- org.springframework.beans.factory.config.AbstractFactoryBean<T>
-
- net.shibboleth.ext.spring.factory.AbstractComponentAwareFactoryBean<T>
-
- net.shibboleth.idp.profile.spring.factory.AbstractCredentialFactoryBean<BasicJWKCredential>
-
- net.shibboleth.oidc.security.credential.BasicJWKCredentialFactoryBean
-
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<BasicJWKCredential>,InitializingBean
public class BasicJWKCredentialFactoryBean extends net.shibboleth.idp.profile.spring.factory.AbstractCredentialFactoryBean<BasicJWKCredential>
Factory bean for Basic JSON Web Keys (JWK).- Since:
- 2.2.0
-
-
Field Summary
Fields Modifier and Type Field Description private booleanfailIfResourceIsNullShould the factory throw an exception if the resource is null?.private ResourcejwkResourceWhere the private key is to be found.private org.slf4j.LoggerlogClass logger.private StringsymmetricKeyAlgorithmThe JCA algorithm name to use if the key to be converted is a symmetric key.-
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 BasicJWKCredentialFactoryBean()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BasicJWKCredentialdoCreateInstance()Class<?>getObjectType()voidsetFailIfResourceIsNull(boolean flag)Should the factory throw an exeception if the resource is null?voidsetResource(Resource res)Set the resource containing the private key.voidsetSymmetricKeyAlgorithm(String algorithm)Set the JCA algorithm name to use if the key to be converted is a symmetric key.-
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
Class logger.
-
jwkResource
@Nullable private Resource jwkResource
Where the private key is to be found.
-
failIfResourceIsNull
private boolean failIfResourceIsNull
Should the factory throw an exception if the resource is null?.
-
symmetricKeyAlgorithm
private String symmetricKeyAlgorithm
The JCA algorithm name to use if the key to be converted is a symmetric key. Default is AES.
-
-
Method Detail
-
setSymmetricKeyAlgorithm
public void setSymmetricKeyAlgorithm(@Nonnull @NotEmpty String algorithm)
Set the JCA algorithm name to use if the key to be converted is a symmetric key.- Parameters:
algorithm- the JCA name
-
setFailIfResourceIsNull
public void setFailIfResourceIsNull(boolean flag)
Should the factory throw an exeception if the resource is null?- Parameters:
flag- the flag
-
setResource
public void setResource(@Nonnull Resource res)Set the resource containing the private key.- Parameters:
res- private key resource, nevernull
-
doCreateInstance
protected BasicJWKCredential doCreateInstance() throws Exception
- Specified by:
doCreateInstancein classAbstractComponentAwareFactoryBean<BasicJWKCredential>- Throws:
Exception
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectTypein interfaceFactoryBean<BasicJWKCredential>- Specified by:
getObjectTypein classAbstractFactoryBean<BasicJWKCredential>
-
-