< Summary

Information
Class: Elsa.Identity.Options.PermissionStampOptions
Assembly: Elsa.Identity
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/Options/PermissionStampOptions.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 19
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_IsEnabled()100%11100%
get_CacheLifetime()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/Options/PermissionStampOptions.cs

#LineLine coverage
 1namespace Elsa.Identity.Options;
 2
 3/// <summary>Controls the optional permission stamp, which tightens revocation below the token lifetime.</summary>
 4public class PermissionStampOptions
 5{
 6    /// <summary>
 7    /// Whether tokens carry a permission stamp that is revalidated on each request. Off by default: the
 8    /// access-token lifetime already bounds revocation, and this trades a cached store read per user per
 9    /// interval for a tighter bound.
 10    /// </summary>
 1211    public bool IsEnabled { get; set; }
 12
 13    /// <summary>
 14    /// How long a computed stamp is cached per node. This, not zero, is the effective revocation bound
 15    /// when the stamp is enabled. Each node computes independently from the store, so no cross-node cache
 16    /// invalidation is required.
 17    /// </summary>
 1018    public TimeSpan CacheLifetime { get; set; } = TimeSpan.FromSeconds(30);
 19}