Package io.jans.as.model.jws
Class EDDSASigner
- java.lang.Object
-
- io.jans.as.model.jws.AbstractJwsSigner
-
- io.jans.as.model.jws.EDDSASigner
-
- All Implemented Interfaces:
JwsSigner
public class EDDSASigner extends AbstractJwsSigner
Implementing the AbstractJwsSigner, that uses EDDSA for signing.- Version:
- January 20, 2021
- Author:
- Sergey Manoylo
-
-
Constructor Summary
Constructors Constructor Description EDDSASigner(SignatureAlgorithm signatureAlgorithm, Certificate certificate)
Constructor.EDDSASigner(SignatureAlgorithm signatureAlgorithm, EDDSAPrivateKey eddsaPrivateKey)
Constructor.EDDSASigner(SignatureAlgorithm signatureAlgorithm, EDDSAPublicKey eddsaPublicKey)
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
-
EDDSASigner
public EDDSASigner(SignatureAlgorithm signatureAlgorithm, EDDSAPrivateKey eddsaPrivateKey)
Constructor.- Parameters:
signatureAlgorithm
- signature algorithm.eddsaPrivateKey
- eddsa private key.
-
EDDSASigner
public EDDSASigner(SignatureAlgorithm signatureAlgorithm, EDDSAPublicKey eddsaPublicKey)
Constructor.- Parameters:
signatureAlgorithm
- signature algorithm.eddsaPublicKey
- eddsa public key.
-
EDDSASigner
public EDDSASigner(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
-
-