Class JWS.Validator
java.lang.Object
de.christofreichardt.json.websignature.JWS.Validator
- All Implemented Interfaces:
BeforeKey, ValidationBegin, ValidationEnd
- Enclosing class:
JWS
protected static class JWS.Validator
extends Object
implements ValidationBegin, BeforeKey, ValidationEnd
Implements all interfaces of the Fluent API related to validating signatures.
- Author:
- Christof Reichardt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompactSerialization(JWSCompactSerialization compactSerialization) Notes the givenJWSCompactSerialization.Notes the givenPublicKey.Notes the givenSecretKey.booleanvalidate()Uses the gathered information to validate the signature.webkey(JsonWebPublicKey jsonWebPublicKey) Notes the givenJsonWebPublicKey.webkey(JsonWebSecretKey jsonWebSecretKey) Notes the givenJsonWebSecretKey.
-
Constructor Details
-
Validator
protected Validator()
-
-
Method Details
-
key
Description copied from interface:BeforeKeyNotes the givenPublicKey. -
key
Description copied from interface:BeforeKeyNotes the givenSecretKey. -
webkey
Description copied from interface:BeforeKeyNotes the givenJsonWebPublicKey.- Specified by:
webkeyin interfaceBeforeKey- Parameters:
jsonWebPublicKey- the givenJsonWebPublicKey.- Returns:
- the next stop within the workflow of the Fluent API regarding the validation of signatures.
-
webkey
Description copied from interface:BeforeKeyNotes the givenJsonWebSecretKey.- Specified by:
webkeyin interfaceBeforeKey- Parameters:
jsonWebSecretKey- the givenJsonWebSecretKey.- Returns:
- the next stop within the workflow of the Fluent API regarding the validation of signatures.
-
compactSerialization
Description copied from interface:ValidationBeginNotes the givenJWSCompactSerialization.- Specified by:
compactSerializationin interfaceValidationBegin- Parameters:
compactSerialization- the givenJWSCompactSerialization.- Returns:
- the next stop within the workflow of the Fluent API regarding the validation of signatures.
-
validate
Description copied from interface:ValidationEndUses the gathered information to validate the signature.- Specified by:
validatein interfaceValidationEnd- Returns:
- true if the signature was verified.
- Throws:
GeneralSecurityException- passed through from the underlying implementations of the algorithms by the JDK.
-