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 java.lang.String
generateSignature(java.lang.String signingInput)
Generating a signature, using URL safe based format.boolean
validateSignature(java.lang.String signingInput, java.lang.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 java.lang.String generateSignature(java.lang.String signingInput) throws java.security.SignatureException
Generating a signature, using URL safe based format.- Specified by:
generateSignature
in classAbstractJwsSigner
- Throws:
java.security.SignatureException
-
validateSignature
public boolean validateSignature(java.lang.String signingInput, java.lang.String signature) throws java.security.SignatureException
Validating a signature.- Specified by:
validateSignature
in classAbstractJwsSigner
- Throws:
java.security.SignatureException
-
-