Package io.jans.as.model.jws
Class ECDSASigner
- java.lang.Object
-
- io.jans.as.model.jws.AbstractJwsSigner
-
- io.jans.as.model.jws.ECDSASigner
-
- All Implemented Interfaces:
JwsSigner
public class ECDSASigner extends AbstractJwsSigner
Implementing the AbstractJwsSigner, that uses ECDSA for signing.- Version:
- September 13, 2021
- Author:
- Javier Rojas Blum, Sergey Manoylo
-
-
Constructor Summary
Constructors Constructor Description ECDSASigner(SignatureAlgorithm signatureAlgorithm, Certificate certificate)
Constructor.ECDSASigner(SignatureAlgorithm signatureAlgorithm, ECDSAPrivateKey ecdsaPrivateKey)
Constructor.ECDSASigner(SignatureAlgorithm signatureAlgorithm, ECDSAPublicKey ecdsaPublicKey)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
generateSignature(String signingInput)
Generating a signature, using URL safe based format.boolean
validateSignature(String signingInput, String signature)
Validating a signature.-
Methods inherited from class io.jans.as.model.jws.AbstractJwsSigner
getSignatureAlgorithm, sign, validate, validateAccessToken, validateAuthorizationCode, validateState
-
-
-
-
Constructor Detail
-
ECDSASigner
public ECDSASigner(SignatureAlgorithm signatureAlgorithm, ECDSAPrivateKey ecdsaPrivateKey)
Constructor.- Parameters:
signatureAlgorithm
- signature algorithm.ecdsaPrivateKey
- ecdsa private key.
-
ECDSASigner
public ECDSASigner(SignatureAlgorithm signatureAlgorithm, ECDSAPublicKey ecdsaPublicKey)
Constructor.- Parameters:
signatureAlgorithm
- signature algorithm.ecdsaPublicKey
- ecdsa public key.
-
ECDSASigner
public ECDSASigner(SignatureAlgorithm signatureAlgorithm, Certificate certificate)
Constructor.- Parameters:
signatureAlgorithm
- signature algorithm.certificate
- certificate (uses RSA, EcDSA, EdDSA).
-
-
Method Detail
-
generateSignature
public String generateSignature(String signingInput) throws SignatureException
Generating a signature, using URL safe based format.- Specified by:
generateSignature
in classAbstractJwsSigner
- Throws:
SignatureException
-
validateSignature
public boolean validateSignature(String signingInput, String signature) throws SignatureException
Validating a signature.- Specified by:
validateSignature
in classAbstractJwsSigner
- Throws:
SignatureException
-
-