< Summary

Information
Class: Elsa.Extensions.ValidateIdentityTokenOptions
Assembly: Elsa.Identity
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/OptionConfigurators/ValidateIdentityTokenOptions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 19
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
PostConfigure(...)0%620%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/OptionConfigurators/ValidateIdentityTokenOptions.cs

#LineLine coverage
 1using Elsa.Common.Exceptions;
 2using Elsa.Identity.Options;
 3using Microsoft.Extensions.Options;
 4
 5// ReSharper disable once CheckNamespace
 6namespace Elsa.Extensions;
 7
 8/// <summary>
 9/// Validates the <see cref="IdentityTokenOptions"/>.
 10/// </summary>
 11public class ValidateIdentityTokenOptions : IPostConfigureOptions<IdentityTokenOptions>
 12{
 13    /// <inheritdoc />
 14    public void PostConfigure(string? name, IdentityTokenOptions options)
 15    {
 016        if (string.IsNullOrWhiteSpace(options.SigningKey))
 017            throw new MissingConfigurationException("SigningKey is required");
 018    }
 19}