T
- The type of the payload. The Fernet token encodes the payload in binary. The type T should be a domain
object or data transfer object representation of that data.public interface StringObjectValidator<T> extends Validator<T>
Validator
for payloads that represent objects as Strings (e.g. JSON or XML). This validator converts the
payload to a String then delegates to getStringTransformer()
to convert that String to an object. If the
deserialisation library you use already provides a way to convert binary into objects, then you can use
Validator
directly instead.
Copyright © 2017 Carlos Macasaet.
Modifier and Type | Method and Description |
---|---|
default Charset |
getCharset() |
default Function<byte[],String> |
getStringCreator()
Override this to specify an alternative way to convert binary data into a String.
|
Function<String,T> |
getStringTransformer()
Plug in your String deserialisation method here.
|
default Function<byte[],T> |
getTransformer()
Implement this to define how decrypted content is deserialised into domain objects.
|
getClock, getMaxClockSkew, getObjectValidator, getTimeToLive, validateAndDecrypt, validateAndDecrypt
default Charset getCharset()
default Function<byte[],String> getStringCreator()
default Function<byte[],T> getTransformer()
Validator
getTransformer
in interface Validator<T>
Copyright © 2017. All rights reserved.