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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionOptional<com.nimbusds.jose.JWSAlgorithm>
convert
(CharSequence object, Class<com.nimbusds.jose.JWSAlgorithm> 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
-
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 interfaceio.micronaut.core.convert.TypeConverter<CharSequence,
com.nimbusds.jose.JWSAlgorithm> - Parameters:
object
- e.g. HS256targetType
- The target type being converted toJWSAlgorithm
context
- TheConversionContext
- Returns:
JWSAlgorithm
-