Initial Commit ...

This commit is contained in:
2024-01-25 04:42:47 +03:30
commit 844b4c47ad
50 changed files with 2615 additions and 0 deletions
+83
View File
@@ -0,0 +1,83 @@
using System.Collections.Generic;
using Newtonsoft.Json;
namespace xIdentityModels.Dtos
{
public class XDiscoveryDocumentDto
{
[JsonProperty ("issuer")]
public string Issuer { get; set; }
[JsonProperty ("jwks_uri")]
public string JwksUri { get; set; }
[JsonProperty ("authorization_endpoint")]
public string AuthorizationEndpoint { get; set; }
[JsonProperty ("token_endpoint")]
public string TokenEndpoint { get; set; }
[JsonProperty ("userinfo_endpoint")]
public string UserinfoEndpoint { get; set; }
[JsonProperty ("end_session_endpoint")]
public string EndSessionEndpoint { get; set; }
[JsonProperty ("check_session_iframe")]
public string CheckSessionIframe { get; set; }
[JsonProperty ("revocation_endpoint")]
public string RevocationEndpoint { get; set; }
[JsonProperty ("introspection_endpoint")]
public string IntrospectionEndpoint { get; set; }
[JsonProperty ("device_authorization_endpoint")]
public string DeviceAuthorizationEndpoint { get; set; }
[JsonProperty ("frontchannel_logout_supported")]
public bool FrontchannelLogoutSupported { get; set; }
[JsonProperty ("frontchannel_logout_session_supported")]
public bool FrontchannelLogoutSessionSupported { get; set; }
[JsonProperty ("backchannel_logout_supported")]
public bool BackchannelLogoutSupported { get; set; }
[JsonProperty ("backchannel_logout_session_supported")]
public bool BackchannelLogoutSessionSupported { get; set; }
[JsonProperty ("scopes_supported")]
public List<string> ScopesSupported { get; set; }
[JsonProperty ("claims_supported")]
public List<string> ClaimsSupported { get; set; }
[JsonProperty ("grant_types_supported")]
public List<string> GrantTypesSupported { get; set; }
[JsonProperty ("response_types_supported")]
public List<string> ResponseTypesSupported { get; set; }
[JsonProperty ("response_modes_supported")]
public List<string> ResponseModesSupported { get; set; }
[JsonProperty ("token_endpoint_auth_methods_supported")]
public List<string> TokenEndpointAuthMethodsSupported { get; set; }
[JsonProperty ("id_token_signing_alg_values_supported")]
public List<string> IdTokenSigningAlgValuesSupported { get; set; }
[JsonProperty ("subject_types_supported")]
public List<string> SubjectTypesSupported { get; set; }
[JsonProperty ("code_challenge_methods_supported")]
public List<string> CodeChallengeMethodsSupported { get; set; }
[JsonProperty ("request_parameter_supported")]
public bool RequestParameterSupported { get; set; }
[JsonProperty ("account_api")]
public string AccountApi { get; set; }
}
}
+14
View File
@@ -0,0 +1,14 @@
using xModels.Base;
using xIdentityModels.Constants;
namespace xIdentityModels.Dtos {
public class XFriendshipInfoDto : XBaseDto {
public string UserId { get; set; }
public bool IsFollower { get; set; }
public bool IsFollowing { get; set; }
public XFriendshipState FollowerState { get; set; }
public XFriendshipState FollowingState { get; set; }
public long Followers { get; set; }
public long Followings { get; set; }
}
}
+9
View File
@@ -0,0 +1,9 @@
using xModels.Base;
namespace xIdentityModels.Dtos {
public class XIdentityMessageDto : XBaseDto {
public string Language { get; set; }
public string ResourceTitle { get; set; }
public string TranslatedValue { get; set; }
}
}
+39
View File
@@ -0,0 +1,39 @@
using System;
using Newtonsoft.Json;
using xModels.Base;
namespace xIdentityModels.Dtos {
public class XProfileImageDto : XBaseDto {
public int Id { get; set; }
[JsonProperty (
"name",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string Name { get; set; }
[JsonProperty (
"thumb",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string Thumb { get; set; }
[JsonProperty (
"path",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string Path { get; set; }
[JsonProperty (
"thumbPath",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string ThumbPath { get; set; }
[JsonProperty (
"creationDate",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public DateTime CreationDate { get; set; }
}
}
+8
View File
@@ -0,0 +1,8 @@
using System.Collections.Generic;
using xModels.Base;
namespace xIdentityModels.Dtos {
public class XUserNameIdRequest : XBaseDto {
public IEnumerable<string> Ids { get; set; }
}
}
+8
View File
@@ -0,0 +1,8 @@
using xModels.Base;
namespace xIdentityModels.Dtos {
public class XUserNameIdResponse : XBaseDto {
public string Id { get; set; }
public string UserName { get; set; }
}
}
+117
View File
@@ -0,0 +1,117 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using xIdentityModels.Constants;
using xModels.Base;
namespace xIdentityModels.Dtos {
public class XUserProfileDto : XBaseDto {
[JsonProperty (
"userId",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string UserId { get; set; }
[JsonProperty (
"userName",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string UserName { get; set; }
[JsonProperty (
"email",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string Email { get; set; }
[JsonProperty (
"emailConfirmed",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public bool EmailConfirmed { get; set; }
[JsonProperty (
"phoneNumber",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string PhoneNumber { get; set; }
[JsonProperty (
"phoneNumberConfirmed",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public bool PhoneNumberConfirmed { get; set; }
[JsonProperty (
"firstName",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string FirstName { get; set; }
[JsonProperty (
"lastName",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string LastName { get; set; }
[JsonProperty (
"dateOfBirth",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public DateTime? DateOfBirth { get; set; }
[JsonProperty (
"creationDate",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public DateTime? CreationDate { get; set; }
[JsonProperty (
"lastLogin",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public DateTime? LastLogin { get; set; }
[JsonProperty (
"avatar",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public string Avatar { get; set; }
[JsonProperty (
"gender",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public XGender Gender { get; set; }
[JsonProperty (
"friendshipInfo",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public XFriendshipInfoDto FriendshipInfo { get; set; }
[JsonProperty (
"roles",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public ICollection<string> Roles { get; set; } = new HashSet<string> ();
[JsonProperty (
"avatars",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public ICollection<XProfileImageDto> Avatars { get; set; } = new HashSet<XProfileImageDto> ();
[JsonProperty (
"isEnable",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public bool IsEnable { get; set; }
[JsonProperty (
"isBanned",
Required = Required.Default,
NullValueHandling = NullValueHandling.Ignore)]
public bool IsBanned { get; set; }
}
}