Class NameToSigningCredentialConverter
java.lang.Object
se.idsec.signservice.integration.config.spring.NameToSigningCredentialConverter
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.core.convert.converter.Converter<String,se.swedenconnect.security.credential.PkiCredential>
public class NameToSigningCredentialConverter
extends Object
implements org.springframework.core.convert.converter.Converter<String,se.swedenconnect.security.credential.PkiCredential>, org.springframework.context.ApplicationContextAware
For Spring Framework users. A
Converter that lets the user reference a PkiCredential instance using
its bean name, or if no bean is found, the signing credential name PkiCredential.getName().
To use this converter it has to be instantiated as a bean and then registered in the registry using
ConverterRegistry.addConverter(Converter).
If you are using Spring Boot, do:
@Bean
@ConfigurationPropertiesBinding
public NameToSigningCredentialConverter nameToSigningCredentialConverter() {
return new NameToSigningCredentialConverter();
}
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionse.swedenconnect.security.credential.PkiCredentialvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
NameToSigningCredentialConverter
public NameToSigningCredentialConverter()
-
-
Method Details
-
convert
- Specified by:
convertin interfaceorg.springframework.core.convert.converter.Converter<String,se.swedenconnect.security.credential.PkiCredential>
-
setApplicationContext
public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-