Class JWSAlgorithmConverter

java.lang.Object
io.micronaut.security.token.jwt.converters.JWSAlgorithmConverter
All Implemented Interfaces:
io.micronaut.core.convert.TypeConverter<CharSequence,com.nimbusds.jose.JWSAlgorithm>

@Singleton public class JWSAlgorithmConverter extends Object implements io.micronaut.core.convert.TypeConverter<CharSequence,com.nimbusds.jose.JWSAlgorithm>
Converts a string to a JWSAlgorithm.
Since:
1.0
Author:
Sergio del Amo
  • Constructor Details

    • JWSAlgorithmConverter

      public JWSAlgorithmConverter()
  • Method Details

    • convert

      public Optional<com.nimbusds.jose.JWSAlgorithm> convert(CharSequence object, Class<com.nimbusds.jose.JWSAlgorithm> targetType, io.micronaut.core.convert.ConversionContext context)
      Specified by:
      convert in interface io.micronaut.core.convert.TypeConverter<CharSequence,com.nimbusds.jose.JWSAlgorithm>
      Parameters:
      object - e.g. HS256
      targetType - The target type being converted to JWSAlgorithm
      context - The ConversionContext
      Returns:
      JWSAlgorithm