The AlwaysOnRequest, AlwaysOnResponse, and AlwaysOnManifest classes do some sort of encoding a request/response to a JWT or decoding a JWT into a request or response. Right now the interfaces for these is rather hodge-podge and assumes a static Secret for encoding/decoding a JWT.
The Problem(s)
The current implementation of JWT encoding/decoding is not intuitive, and does not play well when working with lists of models.
Implementation Ideas
Have JWTEncodable and JWtDecodable interfaces that the various models inherit from.
Have a JWTifier which is sort of like a factory that can take an object and produce a JWT from it, and decode a JWT into a specific object. (not in love with this idea, but having a utlity that does JWT encoding/decoding and interfaces as mentioned above would probably do the trick is a nice and pretty extensible way)
Acceptance Criteria
An AlwaysOnRequest can be encoded/decoded to and from a JWT
An AlwaysOnResponse can be encoded/decoded to and from a JWT
A List of AlwaysOnResponses (i.e. those as part of a ManifestEntry) should be encoded into a single JWT and decoded from a single JWT
It is OK to break current interface's since we're still in early development stages.
Context
The
AlwaysOnRequest
,AlwaysOnResponse
, andAlwaysOnManifest
classes do some sort of encoding a request/response to a JWT or decoding a JWT into a request or response. Right now the interfaces for these is rather hodge-podge and assumes a static Secret for encoding/decoding a JWT.The Problem(s)
The current implementation of JWT encoding/decoding is not intuitive, and does not play well when working with lists of models.
Implementation Ideas
Acceptance Criteria
AlwaysOnRequest
can be encoded/decoded to and from a JWTAlwaysOnResponse
can be encoded/decoded to and from a JWTAlwaysOnResponse
s (i.e. those as part of aManifestEntry
) should be encoded into a single JWT and decoded from a single JWT