Class EncryptionMethodConverter

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

@Singleton public class EncryptionMethodConverter extends Object implements io.micronaut.core.convert.TypeConverter<CharSequence,com.nimbusds.jose.EncryptionMethod>
Converts a string to an EncryptionMethod.
Since:
1.0
Author:
James Kleeh
  • Constructor Details

    • EncryptionMethodConverter

      public EncryptionMethodConverter()
  • Method Details

    • convert

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