< Summary - Envilder .NET SDK

Information
Class: Envilder.Infrastructure.Aws.SsoSessionExpiredDetector
Assembly: Envilder
File(s): /home/runner/work/envilder/envilder/src/sdks/dotnet/Infrastructure/Aws/SsoSessionExpiredDetector.cs
Tag: 427_29134414720
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 26
Line coverage: 100%
Branch coverage
100%
Covered branches: 4
Total branches: 4
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%11100%
IsSsoSessionExpired(...)100%44100%

File(s)

/home/runner/work/envilder/envilder/src/sdks/dotnet/Infrastructure/Aws/SsoSessionExpiredDetector.cs

#LineLine coverage
 1namespace Envilder.Infrastructure.Aws;
 2
 3using System;
 4using System.Collections.Generic;
 5
 6internal static class SsoSessionExpiredDetector
 7{
 18  private static readonly HashSet<string> SsoSessionExpiredTypeNames = new(StringComparer.OrdinalIgnoreCase)
 19  {
 110    "UnauthorizedClientException",
 111    "InvalidGrantException",
 112  };
 13
 14  public static bool IsSsoSessionExpired(Exception? exception)
 15  {
 116    for (var current = exception; current is not null; current = current.InnerException)
 17    {
 118      if (SsoSessionExpiredTypeNames.Contains(current.GetType().Name))
 19      {
 120        return true;
 21      }
 22    }
 23
 124    return false;
 25  }
 26}