Example #1
0
        public async Task SignsWithSpecifiedAlgorithm()
        {
            var signedMessage = await Signer.Run(_options).ToHttpRequestMessage();

            signedMessage.Headers.Authorization.Parameter.Should().Contain("algorithm=\"hs2019\"");
        }
Example #2
0
        public async Task SignsWithExpectedAuthorizationScheme()
        {
            var signedMessage = await Signer.Run(_options).ToHttpRequestMessage();

            signedMessage.Headers.Authorization.Scheme.Should().Be("Signature");
        }
Example #3
0
        public async Task ShouldGenerateABase64EscapedSignatureString()
        {
            var signedMessage = await Signer.Run(_options).ToHttpRequestMessage();

            Base64SignatureRegex.IsMatch(signedMessage.Headers.Authorization.Parameter).Should().BeTrue();
        }