Skip to content

Commit 36b4320

Browse files
author
Vadim Belov
committed
Refactor ExtendedRefreshToken: public & add XML docs
Changed class access to public for wider use. Added XML documentation to the class and its properties, clarifying their purpose and usage. No changes to property types or structure; update focuses on accessibility and code clarity.
1 parent b3a490e commit 36b4320

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

Sources/EasyExtensions.EntityFrameworkCore/Database/ExtendedRefreshToken.cs

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,57 @@
55

66
namespace EasyExtensions.EntityFrameworkCore.Database
77
{
8+
/// <summary>
9+
/// Represents a refresh token with extended metadata, including client device and location information, for
10+
/// authentication scenarios.
11+
/// </summary>
12+
/// <remarks>This class extends the base refresh token functionality by associating additional context
13+
/// such as IP address, user agent, authentication type, and geographic details. These properties can be used to
14+
/// enhance security, auditing, or analytics related to token usage. The class is mapped to the 'refresh_tokens'
15+
/// database table and enforces uniqueness on the token value.</remarks>
816
[Table("refresh_tokens")]
917
[Index(nameof(Token), IsUnique = true)]
10-
internal class ExtendedRefreshToken : RefreshToken
18+
public class ExtendedRefreshToken : RefreshToken
1119
{
20+
/// <summary>
21+
/// Gets or sets the IP address associated with the entity.
22+
/// </summary>
1223
[Column("ip_address")]
1324
public IPAddress IpAddress { get; set; } = null!;
1425

26+
/// <summary>
27+
/// Gets or sets the user agent string associated with the entity.
28+
/// </summary>
1529
[Column("user_agent")]
1630
public string UserAgent { get; set; } = null!;
1731

32+
/// <summary>
33+
/// Gets or sets the authentication type used for this entity.
34+
/// </summary>
1835
[Column("auth_type")]
1936
public AuthType AuthType { get; set; }
2037

38+
/// <summary>
39+
/// Gets or sets the country associated with the entity.
40+
/// </summary>
2141
[Column("country")]
2242
public string? Country { get; set; }
2343

44+
/// <summary>
45+
/// Gets or sets the region associated with the entity.
46+
/// </summary>
2447
[Column("region")]
2548
public string? Region { get; set; }
2649

50+
/// <summary>
51+
/// Gets or sets the name of the city associated with the entity.
52+
/// </summary>
2753
[Column("city")]
2854
public string? City { get; set; }
2955

56+
/// <summary>
57+
/// Gets or sets the name or identifier of the device associated with this entity.
58+
/// </summary>
3059
[Column("device")]
3160
public string? Device { get; set; }
3261
}

0 commit comments

Comments
 (0)