Skip to content

Commit d1819fe

Browse files
Address validation feedback on MCP token fixes
Agent-Logs-Url: https://github.com/IntelliTect/EssentialCSharp.Web/sessions/1309ce59-f673-4f1a-b124-e849af2f4737 Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
1 parent 13626ba commit d1819fe

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

EssentialCSharp.Web/Areas/Identity/Pages/Account/Manage/McpAccess.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<label asp-for="ExpiresOn" class="form-label">Expiry Date</label>
6363
<input asp-for="ExpiresOn" type="date" class="form-control" max="@Model.MaxExpiresOn.ToString("yyyy-MM-dd")" />
6464
<span asp-validation-for="ExpiresOn" class="text-danger"></span>
65-
<div class="form-text">MCP tokens default to @McpApiTokenService.DefaultLifetimeMonths months and cannot exceed @McpApiTokenService.DefaultLifetimeMonths months from today. The token expires at end of day (UTC) on the selected date.</div>
65+
<div class="form-text">MCP tokens expire after @McpApiTokenService.DefaultLifetimeMonths months by default, with a maximum lifetime of @McpApiTokenService.DefaultLifetimeMonths months from today. The token expires at end of day (UTC) on the selected date.</div>
6666
</div>
6767
<button type="submit" class="btn btn-primary">Create Token</button>
6868
</form>

EssentialCSharp.Web/Services/McpApiTokenService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace EssentialCSharp.Web.Services;
1010
public class McpApiTokenService(EssentialCSharpWebContext db)
1111
{
1212
public const int DefaultLifetimeMonths = 6;
13-
public static string MaxExpiryValidationMessage => $"MCP tokens can expire at most {DefaultLifetimeMonths} months from today.";
13+
public static readonly string MaxExpiryValidationMessage = $"MCP tokens can expire at most {DefaultLifetimeMonths} months from today.";
1414

1515
public sealed record ResolvedMcpApiToken(Guid TokenId, string UserId);
1616

0 commit comments

Comments
 (0)