hey guys. i have an api with 3 endpoints. each endpoint reveices the same DTO object. but the values vary.
1st endpoint receives object with these fields: transactionId, clientId, amount, signature
2nd endpoint receives object with these fields: transactionId, amount, signature
3rd endpoint: transactionId, signature
signature is generated before calling the first endpoint. its just transactionId, clientId and amount concatenated together. and then the same signature is used in the 2nd and 3rd endpoints/requests.
i want to have a method to somehow validate signature field in requests. i dont know how can i have a generic/universal method that can be used for all three objects. would it mean that i need to have three different methods? any ideas? thanks alot