Exemple #1
0
        public static IEnumerable <object[]> GetJsonKeys()
        {
            var fixture = new KeyFixture();

            foreach (var key in fixture.Jwks.GetKeys(null))
            {
                yield return(new object[] { key.ToString(), key.Kid, Encoding.UTF8.GetString(key.Alg ?? new byte[0]) });
            }
        }
Exemple #2
0
 public TokenFixture()
 {
     _keyFixture = new KeyFixture();
     var signingKey = _keyFixture.SigningKey;
     var encryptionKey = _keyFixture.EncryptionKey;
     var payloads = CreatePayloads();
     var descriptors = CreateDescriptors(payloads, signingKey, encryptionKey);
     Descriptors = descriptors;
     ValidTokens = CreateTokens(descriptors);
     ValidBinaryTokens = CreateBinaryTokens(ValidTokens);
     InvalidTokens = CreateInvalidToken(signingKey, payloads["small"]);
     Payloads = payloads;
 }