✨ Support OIDC
This commit is contained in:
		| @@ -0,0 +1,23 @@ | ||||
| using System.Text.Json.Serialization; | ||||
|  | ||||
| namespace DysonNetwork.Sphere.Auth.OidcProvider.Responses; | ||||
|  | ||||
| public class AuthorizationResponse | ||||
| { | ||||
|     [JsonPropertyName("code")] | ||||
|     public string Code { get; set; } = null!; | ||||
|  | ||||
|     [JsonPropertyName("state")] | ||||
|     public string? State { get; set; } | ||||
|  | ||||
|     [JsonPropertyName("scope")] | ||||
|     public string? Scope { get; set; } | ||||
|  | ||||
|  | ||||
|     [JsonPropertyName("session_state")] | ||||
|     public string? SessionState { get; set; } | ||||
|  | ||||
|  | ||||
|     [JsonPropertyName("iss")] | ||||
|     public string? Issuer { get; set; } | ||||
| } | ||||
| @@ -0,0 +1,20 @@ | ||||
| using System.Text.Json.Serialization; | ||||
|  | ||||
| namespace DysonNetwork.Sphere.Auth.OidcProvider.Responses; | ||||
|  | ||||
| public class ErrorResponse | ||||
| { | ||||
|     [JsonPropertyName("error")] | ||||
|     public string Error { get; set; } = null!; | ||||
|  | ||||
|     [JsonPropertyName("error_description")] | ||||
|     public string? ErrorDescription { get; set; } | ||||
|  | ||||
|  | ||||
|     [JsonPropertyName("error_uri")] | ||||
|     public string? ErrorUri { get; set; } | ||||
|  | ||||
|  | ||||
|     [JsonPropertyName("state")] | ||||
|     public string? State { get; set; } | ||||
| } | ||||
| @@ -0,0 +1,26 @@ | ||||
| using System.Text.Json.Serialization; | ||||
|  | ||||
| namespace DysonNetwork.Sphere.Auth.OidcProvider.Responses; | ||||
|  | ||||
| public class TokenResponse | ||||
| { | ||||
|     [JsonPropertyName("access_token")] | ||||
|     public string AccessToken { get; set; } = null!; | ||||
|  | ||||
|     [JsonPropertyName("expires_in")] | ||||
|     public int ExpiresIn { get; set; } | ||||
|  | ||||
|     [JsonPropertyName("token_type")] | ||||
|     public string TokenType { get; set; } = "Bearer"; | ||||
|  | ||||
|     [JsonPropertyName("refresh_token")] | ||||
|     public string? RefreshToken { get; set; } | ||||
|  | ||||
|  | ||||
|     [JsonPropertyName("scope")] | ||||
|     public string? Scope { get; set; } | ||||
|  | ||||
|  | ||||
|     [JsonPropertyName("id_token")] | ||||
|     public string? IdToken { get; set; } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user