Browse Source

Update ProcessChallengeContext/ProcessSignOutContext.Nonce's documentation to emphasize that nonces should be generated using a crypto-secure RNG

pull/1626/head
Kévin Chalet 4 years ago
parent
commit
604889b129
  1. 4
      src/OpenIddict.Client/OpenIddictClientEvents.cs
  2. 2
      src/OpenIddict.Server/OpenIddictServerHandlers.Protection.cs

4
src/OpenIddict.Client/OpenIddictClientEvents.cs

@ -792,6 +792,8 @@ public static partial class OpenIddictClientEvents
/// <summary>
/// Gets or sets the nonce that will be used for the challenge demand, if applicable.
/// Note: this value MUST NOT be user-defined or extracted from any request and MUST be random
/// (generated by a random number generator suitable for cryptographic operations).
/// </summary>
public string? Nonce { get; set; }
@ -931,6 +933,8 @@ public static partial class OpenIddictClientEvents
/// <summary>
/// Gets or sets the nonce that will be used for the sign-out demand, if applicable.
/// Note: this value MUST NOT be user-defined or extracted from any request and MUST be random
/// (generated by a random number generator suitable for cryptographic operations).
/// </summary>
public string? Nonce { get; set; }

2
src/OpenIddict.Server/OpenIddictServerHandlers.Protection.cs

@ -1339,7 +1339,7 @@ public static partial class OpenIddictServerHandlers
do
{
// Note: unlike other reference tokens, user codes are meant to be used by humans,
// who may have to enter it in a web form. To ensure it remains easy enough to type
// who may have to enter it in a web form. To ensure they remain easy enough to type
// even by users with non-Latin keyboards, user codes generated by OpenIddict are
// only compound of 12 digits, generated using a crypto-secure random number generator.
// In this case, the resulting user code is estimated to have at most ~40 bits of entropy.

Loading…
Cancel
Save