Skip to content

Commit cc2a4f1

Browse files
committed
Shorten UserIdClaim ValueTuple names
1 parent b5a1bfd commit cc2a4f1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/ModelContextProtocol.AspNetCore/HttpMcpSession.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ public HttpMcpSession(SseResponseStreamTransport transport, ClaimsPrincipal user
1212
}
1313

1414
public SseResponseStreamTransport Transport { get; }
15-
public (string ClaimType, string ClaimValue, string Issuer)? UserIdClaim { get; }
15+
public (string Type, string Value, string Issuer)? UserIdClaim { get; }
1616

1717
public bool HasSameUserId(ClaimsPrincipal user)
18-
=> UserIdClaim?.ClaimValue == GetUserIdClaim(user)?.ClaimValue;
18+
=> UserIdClaim == GetUserIdClaim(user);
1919

2020
// SignalR only checks for ClaimTypes.NameIdentifier in HttpConnectionDispatcher, but AspNetCore.Antiforgery checks that plus the sub and UPN claims.
2121
// However, we short-circuit unlike antiforgery since we expect to call this to verify MCP messages a lot more frequently than
2222
// verifying antiforgery tokens from <form> posts.
23-
private static (string ClaimType, string ClaimValue, string Issuer)? GetUserIdClaim(ClaimsPrincipal user)
23+
private static (string Type, string Value, string Issuer)? GetUserIdClaim(ClaimsPrincipal user)
2424
{
2525
if (user?.Identity?.IsAuthenticated != true)
2626
{

0 commit comments

Comments
 (0)