-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathLogtoTokenResponse.cs
More file actions
39 lines (33 loc) · 1.22 KB
/
LogtoTokenResponse.cs
File metadata and controls
39 lines (33 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.Text.Json.Serialization;
namespace Logto.AspNetCore.Authentication;
/// <summary>
/// The <a href="https://openid.net/specs/openid-connect-core-1_0.html#TokenResponse">successful token response</a> from Logto authorization server.
/// </summary>
public class LogtoTokenResponse
{
/// <summary>
/// The access token issued by the Logto authorization server.
/// </summary>
[JsonPropertyName("access_token")]
public string AccessToken { get; set; } = null!;
/// <summary>
/// The type of the token issued by the Logto authorization server.
/// </summary>
[JsonPropertyName("token_type")]
public string TokenType { get; set; } = null!;
/// <summary>
/// The lifetime in seconds of the access token.
/// </summary>
[JsonPropertyName("expires_in")]
public int ExpiresIn { get; set; }
/// <summary>
/// The refresh token, which can be used to obtain new access tokens using the same authorization grant.
/// </summary>
[JsonPropertyName("refresh_token")]
public string? RefreshToken { get; set; } = null!;
/// <summary>
/// The ID token, which can be used to verify the identity of the user.
/// </summary>
[JsonPropertyName("id_token")]
public string? IdToken { get; set; } = null;
}