Skip to content

Commit

Permalink
correct documentation of DefaultTokenLifetimeInMinutes
Browse files Browse the repository at this point in the history
 - correct documentation of `notbefore` and `expires` default values,
 - include `issuedat` in the documentation.
  • Loading branch information
jjanuszkiewicz authored and brentschmaltz committed Jan 10, 2023
1 parent 9ccf953 commit 0e9e6bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Microsoft.IdentityModel.Tokens/TokenHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ public abstract class TokenHandler
private int _maximumTokenSizeInBytes = TokenValidationParameters.DefaultMaximumTokenSizeInBytes;

/// <summary>
/// Default lifetime of tokens created. When creating tokens, if 'expires' and 'notbefore' are both null,
/// then a default will be set to: expires = DateTime.UtcNow, notbefore = DateTime.UtcNow + TimeSpan.FromMinutes(TokenLifetimeInMinutes).
/// Default lifetime of tokens created. When creating tokens, if 'expires', 'notbefore' or 'issuedat' are null,
/// then a default will be set to: issuedat = DateTime.UtcNow, notbefore = DateTime.UtcNow, expires = DateTime.UtcNow + TimeSpan.FromMinutes(TokenLifetimeInMinutes).
/// </summary>
/// <remarks>See: <see cref="SetDefaultTimesOnTokenCreation"/> for configuration.</remarks>
public static readonly int DefaultTokenLifetimeInMinutes = 60;

/// <summary>
Expand Down

0 comments on commit 0e9e6bd

Please # to comment.