Esempio n. 1
0
        private async Task <JwsEncodedMessage> GetSignedMessageAsync(string url)
        {
            Nonce nonce = await GetNonceAsync();

            var header = GetMessageHeader(url, nonce);

            return(Jws.Sign(
                       integrityProtected: Base64Url.Encode(header),
                       payload: string.Empty,
                       privateKey: _privateKey
                       ));
        }
Esempio n. 2
0
        private async Task <JwsEncodedMessage> GetSignedMessageAsync(string url, JsonObject payload)
        {
            Nonce nonce = await GetNonceAsync();

            var header = GetMessageHeader(url, nonce);

            return(Jws.Sign(
                       integrityProtectedHeader: header,
                       payload: payload,
                       privateKey: _privateKey
                       ));
        }