Jose API will be initially based on the Thorntail Jose API.
The only change I'm planning around that API initially is to to introduce typed sign/verify/encrypt/decrypt overloads which will be supported by an interface like TypeConverter which will (de)serialize a given type to/from String. For example, smallrye-jwt would provide a TypedConverter<JsonWebToken> and then one would write jose.sign(new TestJsonWebToken()) or JsonWebToken jwt = jose.verify(jwsSequence, JsonWebToken.class) or jose.encrypt(new TestJsonWebToken()) or JsonWebToken jwt = jose.decrypt(jweSequence, JsonWebToken.class), etc.
String, JSONB will be supported OOB in/out.
InputStream - on the input though initially it will be internally buffered, the streaming support will be added later as only the best effort is possible to stream and build the JWS and especially JWE at the same time.
Injecting an interface similar to Jose should only be one of the options - finer-grained options should be available such as Jws, Jwe (the former would be composed from Signer and Verificator and the latter from Encryptor and Decryptor) and Jose itself from Jws and Jwe. The goal is is to let users inject the Jose interfaces supporting only what the user code needs to do, example, if the code only signs then injecting `Signer' only would be enough.
JWS and JWE builders will be introduced in the next phase
Jose API will be initially based on the Thorntail Jose API.
The only change I'm planning around that API initially is to to introduce typed sign/verify/encrypt/decrypt overloads which will be supported by an interface like
TypeConverter
which will (de)serialize a given type to/from String. For example,smallrye-jwt
would provide aTypedConverter<JsonWebToken>
and then one would writejose.sign(new TestJsonWebToken())
orJsonWebToken jwt = jose.verify(jwsSequence, JsonWebToken.class)
orjose.encrypt(new TestJsonWebToken())
orJsonWebToken jwt = jose.decrypt(jweSequence, JsonWebToken.class)
, etc.String
,JSONB
will be supported OOB in/out.InputStream
- on the input though initially it will be internally buffered, the streaming support will be added later as only the best effort is possible to stream and build the JWS and especially JWE at the same time.Injecting an interface similar to Jose should only be one of the options - finer-grained options should be available such as
Jws
,Jwe
(the former would be composed fromSigner
andVerificator
and the latter fromEncryptor
andDecryptor
) andJose
itself fromJws
andJwe
. The goal is is to let users inject the Jose interfaces supporting only what the user code needs to do, example, if the code only signs then injecting `Signer' only would be enough.JWS and JWE builders will be introduced in the next phase