Authorization Support (Using ASP.NET Core Native AuthN/AuthZ Integration) (#377)
This commit is contained in:
parent
cd8e5d5f7f
commit
cdf88e7f5d
1 changed files with 4207 additions and 126 deletions
39
tests/ModelContextProtocol.TestOAuthServer/TokenResponse.cs
Normal file
39
tests/ModelContextProtocol.TestOAuthServer/TokenResponse.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ModelContextProtocol.TestOAuthServer;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the token response for OAuth flow.
|
||||
/// </summary>
|
||||
internal sealed class TokenResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the access token.
|
||||
/// </summary>
|
||||
[JsonPropertyName("access_token")]
|
||||
public required string AccessToken { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the token type.
|
||||
/// </summary>
|
||||
[JsonPropertyName("token_type")]
|
||||
public required string TokenType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the token expiration time in seconds.
|
||||
/// </summary>
|
||||
[JsonPropertyName("expires_in")]
|
||||
public required int ExpiresIn { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the refresh token.
|
||||
/// </summary>
|
||||
[JsonPropertyName("refresh_token")]
|
||||
public string? RefreshToken { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the scope approved for this token.
|
||||
/// </summary>
|
||||
[JsonPropertyName("scope")]
|
||||
public string? Scope { get; init; }
|
||||
}
|
||||
Loading…
Reference in a new issue