Class PropertyToPublicKeyConverter

java.lang.Object
se.swedenconnect.security.credential.spring.converters.AbstractResourcePropertyConverter<PublicKey>
se.swedenconnect.security.credential.spring.converters.PropertyToPublicKeyConverter
All Implemented Interfaces:
Aware, ApplicationContextAware, Converter<String,PublicKey>

public class PropertyToPublicKeyConverter extends AbstractResourcePropertyConverter<PublicKey>
A Converter that gets the property value (e.g., classpath:trust.key) and instantiates a PublicKey object.

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 PropertyToPublicKeyConverter propertyToPublicKeyConverter() {
   return new PropertyToPublicKeyConverter();
 }
 
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • PropertyToPublicKeyConverter

      public PropertyToPublicKeyConverter()
  • Method Details