Class KeyTypeConverter
java.lang.Object
io.micronaut.security.token.jwt.converters.KeyTypeConverter
- All Implemented Interfaces:
io.micronaut.core.convert.TypeConverter<CharSequence,
com.nimbusds.jose.jwk.KeyType>
@Singleton
public class KeyTypeConverter
extends Object
implements io.micronaut.core.convert.TypeConverter<CharSequence,com.nimbusds.jose.jwk.KeyType>
Converts a string to a
KeyType
.- Since:
- 1.1.0
- Author:
- Sergio del Amo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionOptional<com.nimbusds.jose.jwk.KeyType>
convert
(CharSequence object, Class<com.nimbusds.jose.jwk.KeyType> targetType, io.micronaut.core.convert.ConversionContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.convert.TypeConverter
convert
-
Constructor Details
-
KeyTypeConverter
public KeyTypeConverter()
-
-
Method Details
-
convert
public Optional<com.nimbusds.jose.jwk.KeyType> convert(CharSequence object, Class<com.nimbusds.jose.jwk.KeyType> targetType, io.micronaut.core.convert.ConversionContext context) - Specified by:
convert
in interfaceio.micronaut.core.convert.TypeConverter<CharSequence,
com.nimbusds.jose.jwk.KeyType> - Parameters:
object
- e.g. ECtargetType
- The target type being converted toKeyType
context
- TheConversionContext
- Returns:
- An optional
KeyType
-