I want to implement authentication for my Jersey-based REST server / client, but I'm not sure how to lay out the code.
In principle, for each operation I have 2 methods - 1 from the server, 1 from the client side.
I narrowed the algorithm - I'm going to use amazon strategy with HMAC.
The question is how to state this in the code - should I add authentication (encryption / decryption code) to each method - both on the server side and on the client side, or should I have one sending method on both sides that will execute encryption / decryption, and then transfer execution control to a more specialized version, so that I have 1 central place where authentication is performed on both the client and the server?
I want to hear your comments on this?
source share