Class ECSignature
- java.lang.Object
-
- io.micronaut.security.token.jwt.signature.AbstractSignatureConfiguration
-
- io.micronaut.security.token.jwt.signature.ec.ECSignature
-
- All Implemented Interfaces:
SignatureConfiguration
- Direct Known Subclasses:
ECSignatureGenerator
public class ECSignature extends AbstractSignatureConfiguration
Elliptic curve signature. Adds method to verify signed JWT.- Since:
- 1.0
- Author:
- Sergio del Amo
- See Also:
- JSON Web Token (JWT) with EC signature
-
-
Field Summary
-
Fields inherited from class io.micronaut.security.token.jwt.signature.AbstractSignatureConfiguration
algorithm
-
-
Constructor Summary
Constructors Constructor Description ECSignature(ECSignatureConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
supportedAlgorithmsMessage()
boolean
supports(com.nimbusds.jose.JWSAlgorithm algorithm)
Whether this signature configuration supports this algorithm.boolean
verify(com.nimbusds.jwt.SignedJWT jwt)
Verify a signed JWT.-
Methods inherited from class io.micronaut.security.token.jwt.signature.AbstractSignatureConfiguration
getAlgorithm, setAlgorithm
-
-
-
-
Constructor Detail
-
ECSignature
public ECSignature(ECSignatureConfiguration config)
- Parameters:
config
- Instance ofECSignatureConfiguration
-
-
Method Detail
-
supportedAlgorithmsMessage
public java.lang.String supportedAlgorithmsMessage()
- Returns:
- message explaining the supported algorithms
-
supports
public boolean supports(com.nimbusds.jose.JWSAlgorithm algorithm)
Description copied from interface:SignatureConfiguration
Whether this signature configuration supports this algorithm.- Parameters:
algorithm
- the signature algorithm- Returns:
- whether this signature configuration supports this algorithm
-
verify
public boolean verify(com.nimbusds.jwt.SignedJWT jwt) throws com.nimbusds.jose.JOSEException
Description copied from interface:SignatureConfiguration
Verify a signed JWT.- Parameters:
jwt
- the signed JWT- Returns:
- whether the signed JWT is verified
- Throws:
com.nimbusds.jose.JOSEException
- exception when verifying the JWT
-
-