Example #1
0
 /// <summary>
 /// Generates key authorization string.
 /// </summary>
 /// <param name="key">The key.</param>
 /// <param name="token">The challenge token.</param>
 /// <returns></returns>
 public static string KeyAuthorization(this IAccountKey key, string token) => $"{token}.{key.Thumbprint()}";
Example #2
0
 /// <summary>
 /// Computes the key authorization string for <paramref name="challenge"/>.
 /// </summary>
 /// <param name="challenge">The challenge.</param>
 /// <param name="key">The key.</param>
 /// <returns>The key authorization string.</returns>
 public static string ComputeKeyAuthorization(this ChallengeEntity challenge, IAccountKey key)
 => $"{challenge.Token}.{key.Thumbprint()}";