diff --git a/src/Casdoor.Client/Models/CasdoorApplication.cs b/src/Casdoor.Client/Models/CasdoorApplication.cs index f9dda9c..9f8efba 100644 --- a/src/Casdoor.Client/Models/CasdoorApplication.cs +++ b/src/Casdoor.Client/Models/CasdoorApplication.cs @@ -20,22 +20,22 @@ public class CasdoorProviderItem { [JsonPropertyName("name")] public string? Name { get; set; } - + [JsonPropertyName("canSignUp")] public bool? CanSignUp { get; set; } - + [JsonPropertyName("canSignIn")] public bool? CanSignIn { get; set; } - + [JsonPropertyName("canUnlink")] public bool? CanUnlink { get; set; } [JsonPropertyName("prompted")] public bool? Prompted { get; set; } - + [JsonPropertyName("alertType")] public string? AlertType { get; set; } - + [JsonPropertyName("provider")] public CasdoorProvider? Provider { get; set; } } @@ -44,7 +44,7 @@ public class CasdoorSignupItem { [JsonPropertyName("name")] public string? Name { get; set; } - + [JsonPropertyName("visible")] public bool? Visible { get; set; } @@ -108,18 +108,30 @@ public class CasdoorApplication [JsonPropertyName("enableWebAuth")] public bool? EnableWebAuth { get; set; } + [JsonPropertyName("enableLinkWithEmail")] + public bool? EnableLinkWithEmail { get; set; } + + [JsonPropertyName("orgChoiceMode")] + public string? OrgChoiceMode { get; set; } + + [JsonPropertyName("samlReplyUrl")] + public string? SamlReplyUrl { get; set; } + [JsonPropertyName("providers")] public CasdoorProviderItem[]? Providers { get; set; } - + [JsonPropertyName("signupItems")] public CasdoorSignupItem[]? SignupItems { get; set; } - [JsonPropertyName("grantTypes")] + [JsonPropertyName("grantTypes")] public string[]? GrantTypes { get; set; } [JsonPropertyName("organizationObj")] public CasdoorOrganization? OrganizationObj { get; set; } - + + [JsonPropertyName("tags")] + public string[]? Tags { get; set; } + [JsonPropertyName("clientId")] public string? ClientId { get; set; } @@ -159,12 +171,18 @@ public class CasdoorApplication [JsonPropertyName("signinHtml")] public string? SigninHtml { get; set; } + [JsonPropertyName("themeData")] + public CasdoorThemeData? ThemeData { get; set; } + [JsonPropertyName("formCss")] public string? FormCss { get; set; } - + + [JsonPropertyName("formCssMobile")] + public string? FormCssMobile { get; set; } + [JsonPropertyName("formOffset")] public int? FormOffset { get; set; } [JsonPropertyName("formBackgroundUrl")] public string? FormBackgroundUrl { get; set; } -} \ No newline at end of file +} diff --git a/src/Casdoor.Client/Models/CasdoorEmailForm.cs b/src/Casdoor.Client/Models/CasdoorEmailForm.cs index c7c6c02..7181cd7 100644 --- a/src/Casdoor.Client/Models/CasdoorEmailForm.cs +++ b/src/Casdoor.Client/Models/CasdoorEmailForm.cs @@ -29,4 +29,7 @@ public class CasdoorEmailForm [JsonPropertyName("receivers")] public string[] Receivers { get; set; } = Array.Empty(); + + [JsonPropertyName("provider")] + public string Provider { get; set; } } diff --git a/src/Casdoor.Client/Models/CasdoorMfaProps.cs b/src/Casdoor.Client/Models/CasdoorMfaProps.cs new file mode 100644 index 0000000..55a4019 --- /dev/null +++ b/src/Casdoor.Client/Models/CasdoorMfaProps.cs @@ -0,0 +1,27 @@ +using System.Text.Json.Serialization; + +namespace Casdoor.Client; + +public class CasdoorMfaProps +{ + [JsonPropertyName("enabled")] + public bool? Enabled { get; set; } + + [JsonPropertyName("isPreferred")] + public bool? IsPreferred { get; set; } + + [JsonPropertyName("mfaType")] + public string? MfaType { get; set; } + + [JsonPropertyName("secret")] + public string? Secret { get; set; } + + [JsonPropertyName("countryCode")] + public string? CountryCode { get; set; } + + [JsonPropertyName("url")] + public string? Url { get; set; } + + [JsonPropertyName("recoveryCodes")] + public string[]? RecoveryCodes { get; set; } +} diff --git a/src/Casdoor.Client/Models/CasdoorOrganization.cs b/src/Casdoor.Client/Models/CasdoorOrganization.cs index 5b0f2ae..05e1033 100644 --- a/src/Casdoor.Client/Models/CasdoorOrganization.cs +++ b/src/Casdoor.Client/Models/CasdoorOrganization.cs @@ -17,6 +17,15 @@ namespace Casdoor.Client; +public class CasdoorMfaItem +{ + [JsonPropertyName("name")] + public string? Name { get; set; } + + [JsonPropertyName("rule")] + public string? Rule { get; set; } +} + public class CasdoorAccountItem { [JsonPropertyName("name")] @@ -58,8 +67,11 @@ public class CasdoorOrganization [JsonPropertyName("passwordSalt")] public string? PasswordSalt { get; set; } - [JsonPropertyName("phonePrefix")] - public string? PhonePrefix { get; set; } + [JsonPropertyName("passwordOptions")] + public string[]? PasswordOptions { get; set; } + + [JsonPropertyName("countryCodes")] + public string[]? CountryCodes { get; set; } [JsonPropertyName("defaultAvatar")] public string? DefaultAvatar { get; set; } @@ -70,15 +82,27 @@ public class CasdoorOrganization [JsonPropertyName("tags")] public string[]? Tags { get; set; } + [JsonPropertyName("languages")] + public string[]? Languages { get; set; } + + [JsonPropertyName("themeData")] + public CasdoorThemeData? ThemeData { get; set; } + [JsonPropertyName("masterPassword")] public string? MasterPassword { get; set; } + [JsonPropertyName("initScore")] + public int? InitScore { get; set; } + [JsonPropertyName("enableSoftDeletion")] public bool? EnableSoftDeletion { get; set; } [JsonPropertyName("isProfilePublic")] public bool? IsProfilePublic { get; set; } - + + [JsonPropertyName("mfaItems")] + public CasdoorMfaItem[]? MfaItems { get; set; } + [JsonPropertyName("accountItems")] - CasdoorAccountItem[]? AccountItems { get; set; } -} \ No newline at end of file + public CasdoorAccountItem[]? AccountItems { get; set; } +} diff --git a/src/Casdoor.Client/Models/CasdoorPermission.cs b/src/Casdoor.Client/Models/CasdoorPermission.cs index 83c2766..a7d2968 100644 --- a/src/Casdoor.Client/Models/CasdoorPermission.cs +++ b/src/Casdoor.Client/Models/CasdoorPermission.cs @@ -34,6 +34,9 @@ public class CasdoorPermission [JsonPropertyName("displayName")] public string? DisplayName { get; set; } + [JsonPropertyName("description")] + public string? Description { get; set; } + [JsonPropertyName("users")] public IEnumerable? Users { get; set; } @@ -75,4 +78,4 @@ public class CasdoorPermission [JsonPropertyName("isEnabled")] public bool IsEnabled { get; set; } -} \ No newline at end of file +} diff --git a/src/Casdoor.Client/Models/CasdoorPermissionRule.cs b/src/Casdoor.Client/Models/CasdoorPermissionRule.cs index 55225e9..c341b4e 100644 --- a/src/Casdoor.Client/Models/CasdoorPermissionRule.cs +++ b/src/Casdoor.Client/Models/CasdoorPermissionRule.cs @@ -1,14 +1,31 @@ -namespace Casdoor.Client; +using System.Text.Json.Serialization; + +namespace Casdoor.Client; public class CasdoorPermissionRule { + [JsonPropertyName("ptype")] public string? Ptype { get; set; } + + [JsonPropertyName("v0")] public string? V0 { get; set; } + + [JsonPropertyName("v1")] public string? V1 { get; set; } + + [JsonPropertyName("v2")] public string? V2 { get; set; } + + [JsonPropertyName("v3")] public string? V3 { get; set; } + + [JsonPropertyName("v4")] public string? V4 { get; set; } + + [JsonPropertyName("v5")] public string? V5 { get; set; } + + [JsonPropertyName("id")] public string? Id { get; set; } } diff --git a/src/Casdoor.Client/Models/CasdoorProvider.cs b/src/Casdoor.Client/Models/CasdoorProvider.cs index f293c2a..3b9ce17 100644 --- a/src/Casdoor.Client/Models/CasdoorProvider.cs +++ b/src/Casdoor.Client/Models/CasdoorProvider.cs @@ -72,6 +72,12 @@ public class CasdoorProvider [JsonPropertyName("customLogo")] public string? CustomLogo { get; set; } + [JsonPropertyName("scopes")] + public string? Scopes { get; set; } + + [JsonPropertyName("userMapping")] + public IDictionary? UserMapping { get; set; } + [JsonPropertyName("host")] public string? Host { get; set; } @@ -114,6 +120,9 @@ public class CasdoorProvider [JsonPropertyName("bucket")] public string? Bucket { get; set; } + [JsonPropertyName("pathPrefix")] + public string? PathPrefix { get; set; } + [JsonPropertyName("metadata")] public string? Metadata { get; set; } @@ -128,4 +137,4 @@ public class CasdoorProvider [JsonPropertyName("providerUrl")] public string? ProviderUrl { get; set; } -} \ No newline at end of file +} diff --git a/src/Casdoor.Client/Models/CasdoorResponse.cs b/src/Casdoor.Client/Models/CasdoorResponse.cs index 8e3a68e..de68664 100644 --- a/src/Casdoor.Client/Models/CasdoorResponse.cs +++ b/src/Casdoor.Client/Models/CasdoorResponse.cs @@ -1,11 +1,11 @@ // Copyright 2022 The Casdoor Authors. All Rights Reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,6 +20,8 @@ public class CasdoorResponse { [JsonPropertyName("status")] public string? Status { get; set; } [JsonPropertyName("msg")] public string? Msg { get; set; } + [JsonPropertyName("sub")] public string? Sub { get; set; } + [JsonPropertyName("name")] public string? Name { get; set; } [JsonPropertyName("data")] public object? Data { get; set; } [JsonPropertyName("data2")] public object? Data2 { get; set; } } @@ -29,6 +31,8 @@ public class CasdoorResponse { [JsonPropertyName("status")] public string? Status { get; set; } [JsonPropertyName("msg")] public string? Msg { get; set; } + [JsonPropertyName("sub")] public string? Sub { get; set; } + [JsonPropertyName("name")] public string? Name { get; set; } [JsonPropertyName("data")] public T? Data { get; set; } [JsonPropertyName("data2")] public object? Data2 { get; set; } } diff --git a/src/Casdoor.Client/Models/CasdoorRole.cs b/src/Casdoor.Client/Models/CasdoorRole.cs index 8895eb0..19f5165 100644 --- a/src/Casdoor.Client/Models/CasdoorRole.cs +++ b/src/Casdoor.Client/Models/CasdoorRole.cs @@ -34,6 +34,9 @@ public class CasdoorRole [JsonPropertyName("displayName")] public string? DisplayName { get; set; } + [JsonPropertyName("description")] + public string? Description { get; set; } + [JsonPropertyName("users")] public IEnumerable? Users { get; set; } diff --git a/src/Casdoor.Client/Models/CasdoorThemeData.cs b/src/Casdoor.Client/Models/CasdoorThemeData.cs new file mode 100644 index 0000000..fbaeb58 --- /dev/null +++ b/src/Casdoor.Client/Models/CasdoorThemeData.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; + +namespace Casdoor.Client; + +public class CasdoorThemeData +{ + [JsonPropertyName("themeType")] + public string? ThemeType { get; set; } + + [JsonPropertyName("colorPrimary")] + public string? ColorPrimary { get; set; } + + [JsonPropertyName("borderRadius")] + public int? BorderRadius { get; set; } + + [JsonPropertyName("isCompact")] + public bool? IsCompact { get; set; } + + [JsonPropertyName("isEnabled")] + public bool? IsEnabled { get; set; } +} diff --git a/src/Casdoor.Client/Models/CasdoorUser.cs b/src/Casdoor.Client/Models/CasdoorUser.cs index 2263bf4..c28be02 100644 --- a/src/Casdoor.Client/Models/CasdoorUser.cs +++ b/src/Casdoor.Client/Models/CasdoorUser.cs @@ -16,6 +16,22 @@ namespace Casdoor.Client; + +public class CasdoorManagedAccount +{ + [JsonPropertyName("application")] + public string? Application { get; set; } + + [JsonPropertyName("username")] + public string? Username { get; set; } + + [JsonPropertyName("password")] + public string? Password { get; set; } + + [JsonPropertyName("signinUrl")] + public string? SigninUrl { get; set; } +} + /// /// CasdoorUser has the same definition as https://github.com/casdoor/casdoor/blob/master/object/user.go#L24 /// @@ -45,6 +61,9 @@ public class CasdoorUser [JsonPropertyName("passwordSalt")] public string? PasswordSalt { get; set; } + [JsonPropertyName("passwordType")] + public string? PasswordType { get; set; } + [JsonPropertyName("displayName")] public string? DisplayName { get; set; } @@ -57,15 +76,24 @@ public class CasdoorUser [JsonPropertyName("avatar")] public string? Avatar { get; set; } + [JsonPropertyName("avatarType")] + public string? AvatarType { get; set; } + [JsonPropertyName("permanentAvatar")] public string? PermanentAvatar { get; set; } [JsonPropertyName("email")] public string? Email { get; set; } + [JsonPropertyName("emailVerified")] + public bool? EmailVerified { get; set; } + [JsonPropertyName("phone")] public string? Phone { get; set; } + [JsonPropertyName("countryCode")] + public string? CountryCode { get; set; } + [JsonPropertyName("location")] public string? Location { get; set; } @@ -144,6 +172,12 @@ public class CasdoorUser [JsonPropertyName("preHash")] public string? PreHash { get; set; } + [JsonPropertyName("accessKey")] + public string? AccessKey { get; set; } + + [JsonPropertyName("accessSecret")] + public string? AccessSecret { get; set; } + [JsonPropertyName("createdIp")] public string? CreatedIp { get; set; } @@ -225,9 +259,174 @@ public class CasdoorUser [JsonPropertyName("douyin")] public string? Douyin { get; set; } + [JsonPropertyName("line")] + public string? Line { get; set; } + + [JsonPropertyName("amazon")] + public string? Amazon { get; set; } + + [JsonPropertyName("auth0")] + public string? Auth0 { get; set; } + + [JsonPropertyName("battlenet")] + public string? BattleNet { get; set; } + + [JsonPropertyName("bitbucket")] + public string? Bitbucket { get; set; } + + [JsonPropertyName("box")] + public string? Box { get; set; } + + [JsonPropertyName("cloudfoundry")] + public string? CloudFoundry { get; set; } + + [JsonPropertyName("dailymotion")] + public string? Dailymotion { get; set; } + + [JsonPropertyName("deezer")] + public string? Deezer { get; set; } + + [JsonPropertyName("digitalocean")] + public string? DigitalOcean { get; set; } + + [JsonPropertyName("discord")] + public string? Discord { get; set; } + + [JsonPropertyName("dropbox")] + public string? Dropbox { get; set; } + + [JsonPropertyName("eveonline")] + public string? EveOnline { get; set; } + + [JsonPropertyName("fitbit")] + public string? Fitbit { get; set; } + + [JsonPropertyName("gitea")] + public string? Gitea { get; set; } + + [JsonPropertyName("heroku")] + public string? Heroku { get; set; } + + [JsonPropertyName("influxcloud")] + public string? InfluxCloud { get; set; } + + [JsonPropertyName("instagram")] + public string? Instagram { get; set; } + + [JsonPropertyName("intercom")] + public string? Intercom { get; set; } + + [JsonPropertyName("kakao")] + public string? Kakao { get; set; } + + [JsonPropertyName("lastfm")] + public string? Lastfm { get; set; } + + [JsonPropertyName("mailru")] + public string? Mailru { get; set; } + + [JsonPropertyName("meetup")] + public string? Meetup { get; set; } + + [JsonPropertyName("microsoftonline")] + public string? MicrosoftOnline { get; set; } + + [JsonPropertyName("naver")] + public string? Naver { get; set; } + + [JsonPropertyName("nextcloud")] + public string? Nextcloud { get; set; } + + [JsonPropertyName("onedrive")] + public string? OneDrive { get; set; } + + [JsonPropertyName("oura")] + public string? Oura { get; set; } + + [JsonPropertyName("patreon")] + public string? Patreon { get; set; } + + [JsonPropertyName("paypal")] + public string? Paypal { get; set; } + + [JsonPropertyName("salesforce")] + public string? SalesForce { get; set; } + + [JsonPropertyName("shopify")] + public string? Shopify { get; set; } + + [JsonPropertyName("soundcloud")] + public string? Soundcloud { get; set; } + + [JsonPropertyName("spotify")] + public string? Spotify { get; set; } + + [JsonPropertyName("strava")] + public string? Strava { get; set; } + + [JsonPropertyName("stripe")] + public string? Stripe { get; set; } + + [JsonPropertyName("tiktok")] + public string? TikTok { get; set; } + + [JsonPropertyName("tumblr")] + public string? Tumblr { get; set; } + + [JsonPropertyName("twitch")] + public string? Twitch { get; set; } + + [JsonPropertyName("twitter")] + public string? Twitter { get; set; } + + [JsonPropertyName("typetalk")] + public string? Typetalk { get; set; } + + [JsonPropertyName("uber")] + public string? Uber { get; set; } + + [JsonPropertyName("vk")] + public string? VK { get; set; } + + [JsonPropertyName("wepay")] + public string? Wepay { get; set; } + + [JsonPropertyName("xero")] + public string? Xero { get; set; } + + [JsonPropertyName("yahoo")] + public string? Yahoo { get; set; } + + [JsonPropertyName("yammer")] + public string? Yammer { get; set; } + + [JsonPropertyName("yandex")] + public string? Yandex { get; set; } + + [JsonPropertyName("zoom")] + public string? Zoom { get; set; } + [JsonPropertyName("custom")] public string? Custom { get; set; } + [JsonPropertyName("preferredMfaType")] + public string? PreferredMfaType { get; set; } + + [JsonPropertyName("recoveryCodes")] + public string[]? RecoveryCodes { get; set; } + + [JsonPropertyName("totpSecret")] + public string? TotpSecret { get; set; } + + [JsonPropertyName("mfaPhoneEnabled")] + public bool? MfaPhoneEnabled { get; set; } + + [JsonPropertyName("mfaEmailEnabled")] + public bool? MfaEmailEnabled { get; set; } + + [JsonPropertyName("multiFactorAuths")] + public CasdoorMfaProps? MultiFactorAuths { get; set; } + [JsonPropertyName("ldap")] public string? Ldap { get; set; } @@ -239,4 +438,16 @@ public class CasdoorUser [JsonPropertyName("permissions")] public IEnumerable? Permissions { get; set; } + + [JsonPropertyName("groups")] + public string[]? Groups { get; set; } + + [JsonPropertyName("lastSigninWrongTime")] + public string? LastSigninWrongTime { get; set; } + + [JsonPropertyName("signinWrongTimes")] + public int? SigninWrongTimes { get; set; } + + [JsonPropertyName("managedAccounts")] + public IEnumerable? ManagedAccounts { get; set; } }