Package io.jans.as.model.jws
Class AbstractJwsSigner
- java.lang.Object
-
- io.jans.as.model.jws.AbstractJwsSigner
-
- All Implemented Interfaces:
JwsSigner
- Direct Known Subclasses:
ECDSASigner
,HMACSigner
,PlainTextSignature
,RSASigner
public abstract class AbstractJwsSigner extends java.lang.Object implements JwsSigner
- Version:
- March 14, 2019
- Author:
- Javier Rojas Blum
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractJwsSigner(SignatureAlgorithm signatureAlgorithm)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.String
generateSignature(java.lang.String signingInput)
SignatureAlgorithm
getSignatureAlgorithm()
Jwt
sign(Jwt jwt)
boolean
validate(Jwt jwt)
boolean
validateAccessToken(java.lang.String accessToken, Jwt idToken)
boolean
validateAuthorizationCode(java.lang.String authorizationCode, Jwt idToken)
abstract boolean
validateSignature(java.lang.String signingInput, java.lang.String signature)
boolean
validateState(java.lang.String state, Jwt idToken)
-
-
-
Constructor Detail
-
AbstractJwsSigner
protected AbstractJwsSigner(SignatureAlgorithm signatureAlgorithm)
-
-
Method Detail
-
getSignatureAlgorithm
public SignatureAlgorithm getSignatureAlgorithm()
- Specified by:
getSignatureAlgorithm
in interfaceJwsSigner
-
sign
public Jwt sign(Jwt jwt) throws InvalidJwtException, java.security.SignatureException
- Specified by:
sign
in interfaceJwsSigner
- Throws:
InvalidJwtException
java.security.SignatureException
-
validateAuthorizationCode
public boolean validateAuthorizationCode(java.lang.String authorizationCode, Jwt idToken)
-
validateAccessToken
public boolean validateAccessToken(java.lang.String accessToken, Jwt idToken)
-
validateState
public boolean validateState(java.lang.String state, Jwt idToken)
-
generateSignature
public abstract java.lang.String generateSignature(java.lang.String signingInput) throws java.security.SignatureException
- Throws:
java.security.SignatureException
-
validateSignature
public abstract boolean validateSignature(java.lang.String signingInput, java.lang.String signature) throws java.security.SignatureException
- Throws:
java.security.SignatureException
-
-