You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Initializes a new instance of the <see cref="McpAuthorizationException"/> class with a specified error message.
22
+
/// </summary>
23
+
/// <param name="message">The message that describes the error.</param>
24
+
publicMcpAuthorizationException(stringmessage)
25
+
:base(message,McpErrorCode.Unauthorized)
26
+
{
27
+
}
28
+
29
+
/// <summary>
30
+
/// Initializes a new instance of the <see cref="McpAuthorizationException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
31
+
/// </summary>
32
+
/// <param name="message">The message that describes the error.</param>
33
+
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
/// Initializes a new instance of the <see cref="McpAuthorizationException"/> class with a specified error message and error code.
41
+
/// </summary>
42
+
/// <param name="message">The message that describes the error.</param>
43
+
/// <param name="errorCode">The MCP error code. Should be either <see cref="McpErrorCode.Unauthorized"/> or <see cref="McpErrorCode.AuthenticationFailed"/>.</param>
thrownewArgumentException($"Error code must be either {nameof(McpErrorCode.Unauthorized)} or {nameof(McpErrorCode.AuthenticationFailed)}",nameof(errorCode));
50
+
}
51
+
}
52
+
53
+
/// <summary>
54
+
/// Initializes a new instance of the <see cref="McpAuthorizationException"/> class with a specified error message, inner exception, and error code.
55
+
/// </summary>
56
+
/// <param name="message">The message that describes the error.</param>
57
+
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
58
+
/// <param name="errorCode">The MCP error code. Should be either <see cref="McpErrorCode.Unauthorized"/> or <see cref="McpErrorCode.AuthenticationFailed"/>.</param>
thrownewArgumentException($"Error code must be either {nameof(McpErrorCode.Unauthorized)} or {nameof(McpErrorCode.AuthenticationFailed)}",nameof(errorCode));
65
+
}
66
+
}
67
+
68
+
/// <summary>
69
+
/// Gets or sets the resource that requires authorization.
70
+
/// </summary>
71
+
publicstring?ResourceUri{get;set;}
72
+
73
+
/// <summary>
74
+
/// Gets or sets the authorization server URI that should be used for authentication.
0 commit comments