Commit graph

10 commits

Author SHA1 Message Date
Leonard Lyubich
a3c4889945 service: implement BearerToken interface on BearerTokenMsg message
This commit:

  * implements (Set)ExpirationEpoch methods on BearerTokenMsg;

  * removes BearerTokenMsg wrapper.
2020-06-18 16:08:44 +03:00
Leonard Lyubich
c360b7d19c service: add ExtendedHeader list to signed payload of the requests 2020-06-18 15:50:01 +03:00
Leonard Lyubich
db53e2ea39 service: make RequestData to provide ExtendedHeadersSource interface 2020-06-18 15:47:55 +03:00
Leonard Lyubich
a3569ad99e service: ad BearerToken to signed payload of the requests 2020-06-18 15:28:58 +03:00
Leonard Lyubich
3f7d3f8a86 service: make RequestData to provide BearerTokenSource interface 2020-06-18 15:24:17 +03:00
Leonard Lyubich
74e917810a service: support broken apart signable payload of the requests
In previous implementation service package provided types and functions
that wrapped signing/verification of data with session token.
This allowed us to use these functions for signing / verification of
service requests of other packages. To support the expansion of messages
with additional parts that need to be signed, you must be able to easily
expand the signed data with new parts.

To achieve the described goal, this commit makes the following changes:

  * adds GroupSignedPayloads and GroupVerifyPayloads functions;

  * renames SignedDataWithToken to RequestData, DataWithTokenSignAccumulator
    to RequestSignedData, DataWithTokenSignSource to RequestVerifyData;

  * renames SignDataWithSessionToken/VerifyAccumulatedSignaturesWithToken
    function to SignRequestData/VerifyRequestData and makes it to use
    GroupSignedPayloads/GroupVerifyPayloads internally.
2020-06-10 20:37:10 +03:00
Leonard Lyubich
52d3c82776 service: implement sign/verify function for data with session token 2020-05-06 11:44:55 +03:00
Leonard Lyubich
74144f207a service: implement functions for verification of signatures 2020-05-05 13:16:21 +03:00
Leonard Lyubich
f3e6caf7e7 service: implement a function for creating and storing a signature 2020-05-04 19:33:18 +03:00
Leonard Lyubich
0ffb1bd61d service: implement a function for signing data 2020-05-04 18:52:56 +03:00