< Summary

Information
Class: ProjectTemplate.Infrastructure.Data.Entities.ExternalLoginAccount
Assembly: ProjectTemplate.Infrastructure
File(s): /home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Infrastructure/Data/Entities/ExternalLoginAccount.cs
Line coverage
100%
Covered lines: 10
Uncovered lines: 0
Coverable lines: 10
Total lines: 57
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_LocalUserId()100%11100%
get_ProviderName()100%11100%
get_NormalizedProviderName()100%11100%
get_ProviderUserId()100%11100%
get_DisplayName()100%11100%
get_Email()100%11100%
get_NormalizedEmail()100%11100%
get_CreatedOnUtc()100%11100%
get_UpdatedOnUtc()100%11100%
get_LastLoginOnUtc()100%11100%

File(s)

/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Infrastructure/Data/Entities/ExternalLoginAccount.cs

#LineLine coverage
 1namespace ProjectTemplate.Infrastructure.Data.Entities;
 2
 3/// <summary>
 4/// Represents a persisted link between a local application user and an external authentication provider identity.
 5/// </summary>
 6public sealed class ExternalLoginAccount : DataEntity
 7{
 8    /// <summary>
 9    /// Local application user ID to which this external login account is linked.
 10    /// </summary>
 6211    public Guid LocalUserId { get; set; }
 12
 13    /// <summary>
 14    /// Provider name of the external authentication service (e.g., "Google", "Facebook", "Microsoft").
 15    /// </summary>
 38416    public string ProviderName { get; set; } = string.Empty;
 17
 18    /// <summary>
 19    /// Normalized provider name used for lookup and uniqueness comparisons.
 20    /// </summary>
 17821    public string NormalizedProviderName { get; set; } = string.Empty;
 22
 23    /// <summary>
 24    /// Provider-specific unique identifier for the user (e.g., the "sub" claim from an OpenID Connect token).
 25    /// </summary>
 30826    public string ProviderUserId { get; set; } = string.Empty;
 27
 28    /// <summary>
 29    /// Display name or email associated with the external account, for informational purposes. This is not used for aut
 30    /// </summary>
 23631    public string? DisplayName { get; set; }
 32
 33    /// <summary>
 34    /// Email address associated with the external account, if available. This is not used for authentication but can be
 35    /// </summary>
 28436    public string? Email { get; set; }
 37
 38    /// <summary>
 39    /// Normalized email address used for lookup comparisons when email-based lookup is needed.
 40    /// </summary>
 8041    public string? NormalizedEmail { get; set; }
 42
 43    /// <summary>
 44    /// Creation timestamp in UTC when this external login account was linked to the local user. This can be useful for 
 45    /// </summary>
 16846    public DateTime CreatedOnUtc { get; set; } = PersistenceTimestamp.UtcNow();
 47
 48    /// <summary>
 49    /// Update timestamp in UTC when this external login account was last modified. This can be useful for auditing and 
 50    /// </summary>
 2251    public DateTime? UpdatedOnUtc { get; set; }
 52
 53    /// <summary>
 54    /// Last login timestamp in UTC when the user authenticated using this external login account. This can be useful fo
 55    /// </summary>
 1656    public DateTime? LastLoginOnUtc { get; set; }
 57}