From 7bd365cf5fa6fd7240be7e0730e44f0127dea1c2 Mon Sep 17 00:00:00 2001 From: MahdiyarGHD Date: Sun, 25 Feb 2024 22:33:16 +0330 Subject: [PATCH] feat: Implemented ResetPassword Tokens --- .../IdentityGeneratedServices/OpenAPI.cs | 3172 +++++++++++++++-- .../OpenAPI.nswag.json | 1535 +++++++- ...rvices.IdentityMicroservice.Clients.csproj | 2 +- .../Database/Contexts/IdentityContext.cs | 3 +- .../Entities/ResetPasswordTokenEntity.cs | 15 + .../Schemas/ResetPasswordTokenSchema.cs | 17 + ...vices.IdentityMicroservice.Database.csproj | 2 +- ...90050_AddedResetPasswordTokens.Designer.cs | 78 + ...20240225190050_AddedResetPasswordTokens.cs | 67 + .../IdentityContextModelSnapshot.cs | 75 + .../Common/ResetPasswordTokenContract.cs | 17 + ...onsumeResetPasswordTokenRequestContract.cs | 14 + ...nerateResetPasswordTokenRequestContract.cs | 14 + ...lidateResetPasswordTokenRequestContract.cs | 13 + ...ervices.IdentityMicroservice.Domain.csproj | 2 +- ...ervices.IdentityMicroservice.Logics.csproj | 4 +- .../Helpers/SecurityHelper.cs | 11 + .../Controllers/AuthenticationController.cs | 5 + .../Controllers/ResetPasswordController.cs | 83 + ...ervices.IdentityMicroservice.WebApi.csproj | 6 + .../Program.cs | 3 +- .../appsettings.json | 2 +- .../serilog.txt | 164 +- 23 files changed, 4837 insertions(+), 467 deletions(-) create mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Entities/ResetPasswordTokenEntity.cs create mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Schemas/ResetPasswordTokenSchema.cs create mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/20240225190050_AddedResetPasswordTokens.Designer.cs create mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/20240225190050_AddedResetPasswordTokens.cs create mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/IdentityContextModelSnapshot.cs create mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Common/ResetPasswordTokenContract.cs create mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/ConsumeResetPasswordTokenRequestContract.cs create mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/GenerateResetPasswordTokenRequestContract.cs create mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/ValidateResetPasswordTokenRequestContract.cs create mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/ResetPasswordController.cs diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.cs index 88adc41..2e40332 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.cs +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.cs @@ -702,53 +702,2443 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu } } + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ResetPasswordClient : EasyMicroservices.Cores.Clients.CoreSwaggerClientBase + { + private string _baseUrl = ""; + private System.Net.Http.HttpClient _httpClient; + private System.Lazy _settings; + + public ResetPasswordClient(string baseUrl, System.Net.Http.HttpClient httpClient) + { + BaseUrl = baseUrl; + _httpClient = httpClient; + _settings = new System.Lazy(CreateSerializerSettings); + } + + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new EasyMicroservices.Cores.Clients.CoreSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set { _baseUrl = value; } + } + + public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GenerateResetPasswordTokenAsync(GenerateResetPasswordTokenRequestContract body) + { + return GenerateResetPasswordTokenAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GenerateResetPasswordTokenAsync(GenerateResetPasswordTokenRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/GenerateResetPasswordToken"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task ValidateResetPasswordTokenAsync(ValidateResetPasswordTokenRequestContract body) + { + return ValidateResetPasswordTokenAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task ValidateResetPasswordTokenAsync(ValidateResetPasswordTokenRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/ValidateResetPasswordToken"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task ConsumeResetPasswordTokenAsync(ConsumeResetPasswordTokenRequestContract body) + { + return ConsumeResetPasswordTokenAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task ConsumeResetPasswordTokenAsync(ConsumeResetPasswordTokenRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/ConsumeResetPasswordToken"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task AddAsync(ResetPasswordTokenContract body) + { + return AddAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task AddAsync(ResetPasswordTokenContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/Add"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task AddBulkAsync(ResetPasswordTokenContractCreateBulkRequestContract body) + { + return AddBulkAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task AddBulkAsync(ResetPasswordTokenContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/AddBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateAsync(ResetPasswordTokenContract body) + { + return UpdateAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateAsync(ResetPasswordTokenContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/Update"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(ResetPasswordTokenContract body) + { + return UpdateChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(ResetPasswordTokenContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/UpdateChangedValuesOnly"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateBulkAsync(ResetPasswordTokenContractUpdateBulkRequestContract body) + { + return UpdateBulkAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateBulkAsync(ResetPasswordTokenContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/UpdateBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(ResetPasswordTokenContractUpdateBulkRequestContract body) + { + return UpdateBulkChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(ResetPasswordTokenContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/UpdateBulkChangedValuesOnly"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) + { + return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/HardDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) + { + return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/HardDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + { + return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/SoftDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) + { + return SoftDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/SoftDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body) + { + return GetByIdAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/GetById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) + { + return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/GetByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByAsync(Int64GetByRequestContract body) + { + return GetByAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetByAsync(Int64GetByRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/GetBy"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) + { + return FilterAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/Filter"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetAllAsync() + { + return GetAllAsync(System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/GetAll"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) + { + return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPassword/GetAllByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + protected struct ObjectResponseResult + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } + } + + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddUserRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _userName; + private string _password; + private string _whiteLabelKey; + + [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UserName + { + get { return _userName; } + + set + { + if (_userName != value) + { + _userName = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Password + { + get { return _password; } + + set + { + if (_password != value) + { + _password = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("whiteLabelKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WhiteLabelKey + { + get { return _whiteLabelKey; } + + set + { + if (_whiteLabelKey != value) + { + _whiteLabelKey = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ApplicationInitializeRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _whiteLabelKey; + private string _language; + + [Newtonsoft.Json.JsonProperty("whiteLabelKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WhiteLabelKey + { + get { return _whiteLabelKey; } + + set + { + if (_whiteLabelKey != value) + { + _whiteLabelKey = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Language + { + get { return _language; } + + set + { + if (_language != value) + { + _language = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ApplicationInitializeResponseContract : System.ComponentModel.INotifyPropertyChanged + { + private string _token; + private bool _isLogin; + + [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Token + { + get { return _token; } + + set + { + if (_token != value) + { + _token = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("isLogin", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsLogin + { + get { return _isLogin; } + + set + { + if (_isLogin != value) + { + _isLogin = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ApplicationInitializeResponseContractMessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private ApplicationInitializeResponseContract _result; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } + + set + { + if (_isSuccess != value) + { + _isSuccess = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error + { + get { return _error; } + + set + { + if (_error != value) + { + _error = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ApplicationInitializeResponseContract Result + { + get { return _result; } + + set + { + if (_result != value) + { + _result = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ClaimContract : System.ComponentModel.INotifyPropertyChanged + { + private string _name; + private string _value; + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name + { + get { return _name; } + + set + { + if (_name != value) + { + _name = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value + { + get { return _value; } + + set + { + if (_value != value) + { + _value = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ConsumeResetPasswordTokenRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _token; + private string _password; + + [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Token + { + get { return _token; } + + set + { + if (_token != value) + { + _token = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Password + { + get { return _password; } + + set + { + if (_password != value) + { + _password = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ErrorContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _validations; + private FailedReasonType _failedReasonType; + private string _message; + private string _endUserMessage; + private string _details; + private System.Collections.Generic.ICollection _stackTrace; + private System.Collections.Generic.ICollection _children; + private ServiceDetailsContract _serviceDetails; + + [Newtonsoft.Json.JsonProperty("validations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Validations + { + get { return _validations; } + + set + { + if (_validations != value) + { + _validations = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("failedReasonType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FailedReasonType FailedReasonType + { + get { return _failedReasonType; } + + set + { + if (_failedReasonType != value) + { + _failedReasonType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message + { + get { return _message; } + + set + { + if (_message != value) + { + _message = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("endUserMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string EndUserMessage + { + get { return _endUserMessage; } + + set + { + if (_endUserMessage != value) + { + _endUserMessage = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Details + { + get { return _details; } + + set + { + if (_details != value) + { + _details = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("stackTrace", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection StackTrace + { + get { return _stackTrace; } + + set + { + if (_stackTrace != value) + { + _stackTrace = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("children", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Children + { + get { return _children; } + + set + { + if (_children != value) + { + _children = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("serviceDetails", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ServiceDetailsContract ServiceDetails + { + get { return _serviceDetails; } + + set + { + if (_serviceDetails != value) + { + _serviceDetails = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public enum FailedReasonType + { + + None = 0, + + Default = 1, + + All = 2, + + Other = 3, + + Unknown = 4, + + Nothing = 5, + + SessionAccessDenied = 6, + + AccessDenied = 7, + + InternalError = 8, + + Duplicate = 9, + + Empty = 10, + + NotFound = 11, + + ValidationsError = 12, + + StreamError = 13, + + WebServiceNotWorking = 14, + + Incorrect = 15, + + OperationFailed = 16, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class FilterRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private bool? _isDeleted; + private System.DateTime? _fromDeletedDateTime; + private System.DateTime? _toDeletedDateTime; + private System.DateTime? _fromCreationDateTime; + private System.DateTime? _toCreationDateTime; + private System.DateTime? _fromModificationDateTime; + private System.DateTime? _toModificationDateTime; + private string _uniqueIdentity; + private GetUniqueIdentityType _uniqueIdentityType; + private long? _index; + private long? _length; + private System.Collections.Generic.ICollection _sortColumnNames; + private string _text; + private string _languageShortName; + + [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? IsDeleted + { + get { return _isDeleted; } + + set + { + if (_isDeleted != value) + { + _isDeleted = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("fromDeletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTime? FromDeletedDateTime + { + get { return _fromDeletedDateTime; } + + set + { + if (_fromDeletedDateTime != value) + { + _fromDeletedDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("toDeletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTime? ToDeletedDateTime + { + get { return _toDeletedDateTime; } + + set + { + if (_toDeletedDateTime != value) + { + _toDeletedDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("fromCreationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTime? FromCreationDateTime + { + get { return _fromCreationDateTime; } + + set + { + if (_fromCreationDateTime != value) + { + _fromCreationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("toCreationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTime? ToCreationDateTime + { + get { return _toCreationDateTime; } + + set + { + if (_toCreationDateTime != value) + { + _toCreationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("fromModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTime? FromModificationDateTime + { + get { return _fromModificationDateTime; } + + set + { + if (_fromModificationDateTime != value) + { + _fromModificationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("toModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTime? ToModificationDateTime + { + get { return _toModificationDateTime; } + + set + { + if (_toModificationDateTime != value) + { + _toModificationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } + + set + { + if (_uniqueIdentity != value) + { + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentityType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GetUniqueIdentityType UniqueIdentityType + { + get { return _uniqueIdentityType; } + + set + { + if (_uniqueIdentityType != value) + { + _uniqueIdentityType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("index", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Index + { + get { return _index; } + + set + { + if (_index != value) + { + _index = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Length + { + get { return _length; } + + set + { + if (_length != value) + { + _length = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("sortColumnNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection SortColumnNames + { + get { return _sortColumnNames; } + + set + { + if (_sortColumnNames != value) + { + _sortColumnNames = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Text + { + get { return _text; } + + set + { + if (_text != value) + { + _text = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("languageShortName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LanguageShortName + { + get { return _languageShortName; } + + set + { + if (_languageShortName != value) + { + _languageShortName = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class AddUserRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class GenerateResetPasswordTokenRequestContract : System.ComponentModel.INotifyPropertyChanged { - private string _userName; - private string _password; - private string _whiteLabelKey; + private long _expireTimeInSeconds; + private string _uniqueIdentity; - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName + [Newtonsoft.Json.JsonProperty("expireTimeInSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long ExpireTimeInSeconds { - get { return _userName; } + get { return _expireTimeInSeconds; } set { - if (_userName != value) + if (_expireTimeInSeconds != value) { - _userName = value; + _expireTimeInSeconds = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _password; } + get { return _uniqueIdentity; } set { - if (_password != value) + if (_uniqueIdentity != value) { - _password = value; + _uniqueIdentity = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("whiteLabelKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string WhiteLabelKey + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _whiteLabelKey; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class GetByUniqueIdentityRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _uniqueIdentity; + private GetUniqueIdentityType _type; + + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } set { - if (_whiteLabelKey != value) + if (_uniqueIdentity != value) { - _whiteLabelKey = value; + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GetUniqueIdentityType Type + { + get { return _type; } + + set + { + if (_type != value) + { + _type = value; RaisePropertyChanged(); } } @@ -765,36 +3155,72 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ApplicationInitializeRequestContract : System.ComponentModel.INotifyPropertyChanged + public enum GetUniqueIdentityType { - private string _whiteLabelKey; - private string _language; - [Newtonsoft.Json.JsonProperty("whiteLabelKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string WhiteLabelKey + None = 0, + + Default = 1, + + All = 2, + + Other = 3, + + Unknown = 4, + + Nothing = 5, + + OnlyParent = 6, + + OnlyChilren = 7, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64DeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _ids; + + [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Ids { - get { return _whiteLabelKey; } + get { return _ids; } set { - if (_whiteLabelKey != value) + if (_ids != value) { - _whiteLabelKey = value; + _ids = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Language + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _language; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64DeleteRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _id; + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id + { + get { return _id; } set { - if (_language != value) + if (_id != value) { - _language = value; + _id = value; RaisePropertyChanged(); } } @@ -811,36 +3237,82 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ApplicationInitializeResponseContract : System.ComponentModel.INotifyPropertyChanged + public partial class Int64GetByIdRequestContract : System.ComponentModel.INotifyPropertyChanged { - private string _token; - private bool _isLogin; + private long _id; - [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Token + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id + { + get { return _id; } + + set + { + if (_id != value) + { + _id = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64GetByRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _id; + private string _uniqueIdentity; + private GetUniqueIdentityType _uniqueIdentityType; + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id + { + get { return _id; } + + set + { + if (_id != value) + { + _id = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _token; } + get { return _uniqueIdentity; } set { - if (_token != value) + if (_uniqueIdentity != value) { - _token = value; + _uniqueIdentity = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("isLogin", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsLogin + [Newtonsoft.Json.JsonProperty("uniqueIdentityType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GetUniqueIdentityType UniqueIdentityType { - get { return _isLogin; } + get { return _uniqueIdentityType; } set { - if (_isLogin != value) + if (_uniqueIdentityType != value) { - _isLogin = value; + _uniqueIdentityType = value; RaisePropertyChanged(); } } @@ -857,12 +3329,12 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ApplicationInitializeResponseContractMessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class Int64MessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; private SuccessContract _success; - private ApplicationInitializeResponseContract _result; + private long _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -910,7 +3382,7 @@ public SuccessContract Success } [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ApplicationInitializeResponseContract Result + public long Result { get { return _result; } @@ -935,36 +3407,36 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ClaimContract : System.ComponentModel.INotifyPropertyChanged + public partial class Int64SoftDeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged { - private string _name; - private string _value; + private System.Collections.Generic.ICollection _ids; + private bool _isDelete; - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name + [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Ids { - get { return _name; } + get { return _ids; } set { - if (_name != value) + if (_ids != value) { - _name = value; + _ids = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value + [Newtonsoft.Json.JsonProperty("isDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDelete { - get { return _value; } + get { return _isDelete; } set { - if (_value != value) + if (_isDelete != value) { - _value = value; + _isDelete = value; RaisePropertyChanged(); } } @@ -981,132 +3453,190 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ErrorContract : System.ComponentModel.INotifyPropertyChanged + public partial class Int64SoftDeleteRequestContract : System.ComponentModel.INotifyPropertyChanged { - private System.Collections.Generic.ICollection _validations; - private FailedReasonType _failedReasonType; - private string _message; - private string _endUserMessage; - private string _details; - private System.Collections.Generic.ICollection _stackTrace; - private System.Collections.Generic.ICollection _children; - private ServiceDetailsContract _serviceDetails; + private long _id; + private bool _isDelete; - [Newtonsoft.Json.JsonProperty("validations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Validations + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _validations; } + get { return _id; } set { - if (_validations != value) + if (_id != value) { - _validations = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("failedReasonType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public FailedReasonType FailedReasonType + [Newtonsoft.Json.JsonProperty("isDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDelete { - get { return _failedReasonType; } + get { return _isDelete; } set { - if (_failedReasonType != value) + if (_isDelete != value) { - _failedReasonType = value; + _isDelete = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Message + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _message; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class LoginByPersonalAccessTokenRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _personalAccessToken; + + [Newtonsoft.Json.JsonProperty("personalAccessToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PersonalAccessToken + { + get { return _personalAccessToken; } set { - if (_message != value) + if (_personalAccessToken != value) { - _message = value; + _personalAccessToken = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("endUserMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EndUserMessage + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _endUserMessage; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class LoginWithTokenResponseContract : System.ComponentModel.INotifyPropertyChanged + { + private long _userId; + private string _token; + + [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long UserId + { + get { return _userId; } set { - if (_endUserMessage != value) + if (_userId != value) { - _endUserMessage = value; + _userId = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details + [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Token { - get { return _details; } + get { return _token; } set { - if (_details != value) + if (_token != value) { - _details = value; + _token = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("stackTrace", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection StackTrace + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _stackTrace; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class LoginWithTokenResponseContractMessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private LoginWithTokenResponseContract _result; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } set { - if (_stackTrace != value) + if (_isSuccess != value) { - _stackTrace = value; + _isSuccess = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("children", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Children + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error { - get { return _children; } + get { return _error; } set { - if (_children != value) + if (_error != value) { - _children = value; + _error = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("serviceDetails", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ServiceDetailsContract ServiceDetails + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success { - get { return _serviceDetails; } + get { return _success; } set { - if (_serviceDetails != value) + if (_success != value) { - _serviceDetails = value; + _success = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public LoginWithTokenResponseContract Result + { + get { return _result; } + + set + { + if (_result != value) + { + _result = value; RaisePropertyChanged(); } } @@ -1123,60 +3653,82 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public enum FailedReasonType + public partial class MessageContract : System.ComponentModel.INotifyPropertyChanged { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; - None = 0, - - Default = 1, - - All = 2, - - Other = 3, - - Unknown = 4, - - Nothing = 5, - - SessionAccessDenied = 6, - - AccessDenied = 7, - - InternalError = 8, - - Duplicate = 9, - - Empty = 10, + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } - NotFound = 11, + set + { + if (_isSuccess != value) + { + _isSuccess = value; + RaisePropertyChanged(); + } + } + } - ValidationsError = 12, + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error + { + get { return _error; } - StreamError = 13, + set + { + if (_error != value) + { + _error = value; + RaisePropertyChanged(); + } + } + } - WebServiceNotWorking = 14, + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } - Incorrect = 15, + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } - OperationFailed = 16, + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class LoginByPersonalAccessTokenRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class RegenerateTokenContract : System.ComponentModel.INotifyPropertyChanged { - private string _personalAccessToken; + private System.Collections.Generic.ICollection _claims; - [Newtonsoft.Json.JsonProperty("personalAccessToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PersonalAccessToken + [Newtonsoft.Json.JsonProperty("claims", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Claims { - get { return _personalAccessToken; } + get { return _claims; } set { - if (_personalAccessToken != value) + if (_claims != value) { - _personalAccessToken = value; + _claims = value; RaisePropertyChanged(); } } @@ -1193,10 +3745,9 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class LoginWithTokenResponseContract : System.ComponentModel.INotifyPropertyChanged + public partial class RegisterResponseContract : System.ComponentModel.INotifyPropertyChanged { private long _userId; - private string _token; [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long UserId @@ -1213,21 +3764,6 @@ public long UserId } } - [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Token - { - get { return _token; } - - set - { - if (_token != value) - { - _token = value; - RaisePropertyChanged(); - } - } - } - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) @@ -1239,12 +3775,12 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class LoginWithTokenResponseContractMessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class RegisterResponseContractMessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; private SuccessContract _success; - private LoginWithTokenResponseContract _result; + private RegisterResponseContract _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -1292,7 +3828,7 @@ public SuccessContract Success } [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public LoginWithTokenResponseContract Result + public RegisterResponseContract Result { get { return _result; } @@ -1317,52 +3853,84 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class MessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class ResetPasswordTokenContract : System.ComponentModel.INotifyPropertyChanged { - private bool _isSuccess; - private ErrorContract _error; - private SuccessContract _success; + private long _id; + private string _token; + private string _uniqueIdentity; + private bool _hasConsumed; + private System.DateTime _expirationDateTime; - [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsSuccess + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _isSuccess; } + get { return _id; } set { - if (_isSuccess != value) + if (_id != value) { - _isSuccess = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ErrorContract Error + [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Token { - get { return _error; } + get { return _token; } set { - if (_error != value) + if (_token != value) { - _error = value; + _token = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SuccessContract Success + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _success; } + get { return _uniqueIdentity; } set { - if (_success != value) + if (_uniqueIdentity != value) { - _success = value; + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("hasConsumed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasConsumed + { + get { return _hasConsumed; } + + set + { + if (_hasConsumed != value) + { + _hasConsumed = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("expirationDateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTime ExpirationDateTime + { + get { return _expirationDateTime; } + + set + { + if (_expirationDateTime != value) + { + _expirationDateTime = value; RaisePropertyChanged(); } } @@ -1379,20 +3947,20 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class RegenerateTokenContract : System.ComponentModel.INotifyPropertyChanged + public partial class ResetPasswordTokenContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged { - private System.Collections.Generic.ICollection _claims; + private System.Collections.Generic.ICollection _items; - [Newtonsoft.Json.JsonProperty("claims", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Claims + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { - get { return _claims; } + get { return _items; } set { - if (_claims != value) + if (_items != value) { - _claims = value; + _items = value; RaisePropertyChanged(); } } @@ -1409,20 +3977,100 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class RegisterResponseContract : System.ComponentModel.INotifyPropertyChanged + public partial class ResetPasswordTokenContractListMessageContract : System.ComponentModel.INotifyPropertyChanged { - private long _userId; + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private System.Collections.Generic.ICollection _result; + private long _totalCount; + private bool _hasItems; - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long UserId + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess { - get { return _userId; } + get { return _isSuccess; } set { - if (_userId != value) + if (_isSuccess != value) { - _userId = value; + _isSuccess = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error + { + get { return _error; } + + set + { + if (_error != value) + { + _error = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Result + { + get { return _result; } + + set + { + if (_result != value) + { + _result = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long TotalCount + { + get { return _totalCount; } + + set + { + if (_totalCount != value) + { + _totalCount = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasItems + { + get { return _hasItems; } + + set + { + if (_hasItems != value) + { + _hasItems = value; RaisePropertyChanged(); } } @@ -1439,12 +4087,12 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class RegisterResponseContractMessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class ResetPasswordTokenContractMessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; private SuccessContract _success; - private RegisterResponseContract _result; + private ResetPasswordTokenContract _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -1492,7 +4140,7 @@ public SuccessContract Success } [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public RegisterResponseContract Result + public ResetPasswordTokenContract Result { get { return _result; } @@ -1516,6 +4164,36 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ResetPasswordTokenContractUpdateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class ServiceDetailsContract : System.ComponentModel.INotifyPropertyChanged { @@ -1594,6 +4272,68 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class SortColumnStrategyContract : System.ComponentModel.INotifyPropertyChanged + { + private string _columnName; + private bool? _isDescending; + private int _index; + + [Newtonsoft.Json.JsonProperty("columnName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ColumnName + { + get { return _columnName; } + + set + { + if (_columnName != value) + { + _columnName = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("isDescending", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? IsDescending + { + get { return _isDescending; } + + set + { + if (_isDescending != value) + { + _isDescending = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("index", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Index + { + get { return _index; } + + set + { + if (_index != value) + { + _index = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class SuccessContract : System.ComponentModel.INotifyPropertyChanged { @@ -1872,6 +4612,36 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ValidateResetPasswordTokenRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _token; + + [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Token + { + get { return _token; } + + set + { + if (_token != value) + { + _token = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class ValidationContract : System.ComponentModel.INotifyPropertyChanged { diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.nswag.json b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.nswag.json index 2abd723..86339f7 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.nswag.json +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.nswag.json @@ -347,6 +347,918 @@ } } } + }, + "/api/ResetPassword/GenerateResetPasswordToken": { + "post": { + "tags": [ + "ResetPassword" + ], + "operationId": "GenerateResetPasswordToken", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateResetPasswordTokenRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GenerateResetPasswordTokenRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GenerateResetPasswordTokenRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/ValidateResetPasswordToken": { + "post": { + "tags": [ + "ResetPassword" + ], + "operationId": "ValidateResetPasswordToken", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateResetPasswordTokenRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ValidateResetPasswordTokenRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ValidateResetPasswordTokenRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/ConsumeResetPasswordToken": { + "post": { + "tags": [ + "ResetPassword" + ], + "operationId": "ConsumeResetPasswordToken", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConsumeResetPasswordTokenRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ConsumeResetPasswordTokenRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ConsumeResetPasswordTokenRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/Add": { + "post": { + "tags": [ + "ResetPassword" + ], + "operationId": "Add", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/AddBulk": { + "post": { + "tags": [ + "ResetPassword" + ], + "operationId": "AddBulk", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractCreateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractCreateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractCreateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/Update": { + "put": { + "tags": [ + "ResetPassword" + ], + "operationId": "Update", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/UpdateChangedValuesOnly": { + "put": { + "tags": [ + "ResetPassword" + ], + "operationId": "UpdateChangedValuesOnly", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/UpdateBulk": { + "put": { + "tags": [ + "ResetPassword" + ], + "operationId": "UpdateBulk", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractUpdateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractUpdateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractUpdateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/UpdateBulkChangedValuesOnly": { + "put": { + "tags": [ + "ResetPassword" + ], + "operationId": "UpdateBulkChangedValuesOnly", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractUpdateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractUpdateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractUpdateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/HardDeleteById": { + "delete": { + "tags": [ + "ResetPassword" + ], + "operationId": "HardDeleteById", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/HardDeleteBulkByIds": { + "delete": { + "tags": [ + "ResetPassword" + ], + "operationId": "HardDeleteBulkByIds", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/SoftDeleteById": { + "delete": { + "tags": [ + "ResetPassword" + ], + "operationId": "SoftDeleteById", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/SoftDeleteBulkByIds": { + "delete": { + "tags": [ + "ResetPassword" + ], + "operationId": "SoftDeleteBulkByIds", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/GetById": { + "post": { + "tags": [ + "ResetPassword" + ], + "operationId": "GetById", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByIdRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByIdRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByIdRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/GetByUniqueIdentity": { + "post": { + "tags": [ + "ResetPassword" + ], + "operationId": "GetByUniqueIdentity", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/GetBy": { + "post": { + "tags": [ + "ResetPassword" + ], + "operationId": "GetBy", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/Filter": { + "post": { + "tags": [ + "ResetPassword" + ], + "operationId": "Filter", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractListMessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/GetAll": { + "get": { + "tags": [ + "ResetPassword" + ], + "operationId": "GetAll", + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractListMessageContract" + } + } + } + } + } + } + }, + "/api/ResetPassword/GetAllByUniqueIdentity": { + "post": { + "tags": [ + "ResetPassword" + ], + "operationId": "GetAllByUniqueIdentity", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordTokenContractListMessageContract" + } + } + } + } + } + } } }, "components": { @@ -355,49 +1267,375 @@ "type": "object", "additionalProperties": false, "properties": { - "userName": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "whiteLabelKey": { - "type": "string", - "nullable": true + "userName": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "whiteLabelKey": { + "type": "string", + "nullable": true + } + } + }, + "ApplicationInitializeRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "whiteLabelKey": { + "type": "string", + "nullable": true + }, + "language": { + "type": "string", + "nullable": true + } + } + }, + "ApplicationInitializeResponseContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "token": { + "type": "string", + "nullable": true + }, + "isLogin": { + "type": "boolean" + } + } + }, + "ApplicationInitializeResponseContractMessageContract": { + "title": "MessageContract", + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "$ref": "#/components/schemas/ApplicationInitializeResponseContract" + } + } + }, + "ClaimContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + } + }, + "ConsumeResetPasswordTokenRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "token": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + } + } + }, + "ErrorContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "validations": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ValidationContract" + } + }, + "failedReasonType": { + "$ref": "#/components/schemas/FailedReasonType" + }, + "message": { + "type": "string", + "nullable": true + }, + "endUserMessage": { + "type": "string", + "nullable": true + }, + "details": { + "type": "string", + "nullable": true + }, + "stackTrace": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "children": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ErrorContract" + } + }, + "serviceDetails": { + "$ref": "#/components/schemas/ServiceDetailsContract" + } + } + }, + "FailedReasonType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "None", + "Default", + "All", + "Other", + "Unknown", + "Nothing", + "SessionAccessDenied", + "AccessDenied", + "InternalError", + "Duplicate", + "Empty", + "NotFound", + "ValidationsError", + "StreamError", + "WebServiceNotWorking", + "Incorrect", + "OperationFailed" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ] + }, + "FilterRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "isDeleted": { + "title": "Nullable", + "type": "boolean", + "nullable": true + }, + "fromDeletedDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "toDeletedDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "fromCreationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "toCreationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "fromModificationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "toModificationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + }, + "uniqueIdentityType": { + "$ref": "#/components/schemas/GetUniqueIdentityType" + }, + "index": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + }, + "length": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + }, + "sortColumnNames": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/SortColumnStrategyContract" + } + }, + "text": { + "type": "string", + "nullable": true + }, + "languageShortName": { + "type": "string", + "nullable": true + } + } + }, + "GenerateResetPasswordTokenRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "expireTimeInSeconds": { + "type": "integer", + "format": "int64" + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + } + } + }, + "GetByUniqueIdentityRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "uniqueIdentity": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/GetUniqueIdentityType" + } + } + }, + "GetUniqueIdentityType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "None", + "Default", + "All", + "Other", + "Unknown", + "Nothing", + "OnlyParent", + "OnlyChilren" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + }, + "Int64DeleteBulkRequestContract": { + "title": "DeleteBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "ids": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "integer", + "format": "int64" + } } } }, - "ApplicationInitializeRequestContract": { + "Int64DeleteRequestContract": { + "title": "DeleteRequestContract", "type": "object", "additionalProperties": false, "properties": { - "whiteLabelKey": { - "type": "string", - "nullable": true - }, - "language": { - "type": "string", - "nullable": true + "id": { + "type": "integer", + "format": "int64" } } }, - "ApplicationInitializeResponseContract": { + "Int64GetByIdRequestContract": { + "title": "GetByIdRequestContract", "type": "object", "additionalProperties": false, "properties": { - "token": { + "id": { + "type": "integer", + "format": "int64" + } + } + }, + "Int64GetByRequestContract": { + "title": "GetByRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "uniqueIdentity": { "type": "string", "nullable": true }, - "isLogin": { - "type": "boolean" + "uniqueIdentityType": { + "$ref": "#/components/schemas/GetUniqueIdentityType" } } }, - "ApplicationInitializeResponseContractMessageContract": { - "title": "MessageContract", + "Int64MessageContract": { + "title": "MessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -411,114 +1649,44 @@ "$ref": "#/components/schemas/SuccessContract" }, "result": { - "$ref": "#/components/schemas/ApplicationInitializeResponseContract" + "type": "integer", + "format": "int64" } } }, - "ClaimContract": { + "Int64SoftDeleteBulkRequestContract": { + "title": "SoftDeleteBulkRequestContract", "type": "object", "additionalProperties": false, "properties": { - "name": { - "type": "string", - "nullable": true + "ids": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "integer", + "format": "int64" + } }, - "value": { - "type": "string", - "nullable": true + "isDelete": { + "type": "boolean" } } }, - "ErrorContract": { + "Int64SoftDeleteRequestContract": { + "title": "SoftDeleteRequestContract", "type": "object", "additionalProperties": false, "properties": { - "validations": { - "title": "List", - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/ValidationContract" - } - }, - "failedReasonType": { - "$ref": "#/components/schemas/FailedReasonType" - }, - "message": { - "type": "string", - "nullable": true - }, - "endUserMessage": { - "type": "string", - "nullable": true - }, - "details": { - "type": "string", - "nullable": true - }, - "stackTrace": { - "title": "List", - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - }, - "children": { - "title": "List", - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/ErrorContract" - } + "id": { + "type": "integer", + "format": "int64" }, - "serviceDetails": { - "$ref": "#/components/schemas/ServiceDetailsContract" + "isDelete": { + "type": "boolean" } } }, - "FailedReasonType": { - "type": "integer", - "format": "int32", - "x-enumNames": [ - "None", - "Default", - "All", - "Other", - "Unknown", - "Nothing", - "SessionAccessDenied", - "AccessDenied", - "InternalError", - "Duplicate", - "Empty", - "NotFound", - "ValidationsError", - "StreamError", - "WebServiceNotWorking", - "Incorrect", - "OperationFailed" - ], - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16 - ] - }, "LoginByPersonalAccessTokenRequestContract": { "type": "object", "additionalProperties": false, @@ -620,6 +1788,112 @@ } } }, + "ResetPasswordTokenContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "token": { + "type": "string", + "nullable": true + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + }, + "hasConsumed": { + "type": "boolean" + }, + "expirationDateTime": { + "type": "string", + "format": "date-time" + } + } + }, + "ResetPasswordTokenContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + } + } + }, + "ResetPasswordTokenContractListMessageContract": { + "title": "ListMessageContract", + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + }, + "totalCount": { + "type": "integer", + "format": "int64" + }, + "hasItems": { + "type": "boolean", + "readOnly": true + } + } + }, + "ResetPasswordTokenContractMessageContract": { + "title": "MessageContract", + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + } + }, + "ResetPasswordTokenContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ResetPasswordTokenContract" + } + } + } + }, "ServiceDetailsContract": { "type": "object", "additionalProperties": false, @@ -642,6 +1916,25 @@ } } }, + "SortColumnStrategyContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "columnName": { + "type": "string", + "nullable": true + }, + "isDescending": { + "title": "Nullable", + "type": "boolean", + "nullable": true + }, + "index": { + "type": "integer", + "format": "int32" + } + } + }, "SuccessContract": { "type": "object", "additionalProperties": false, @@ -725,6 +2018,16 @@ } } }, + "ValidateResetPasswordTokenRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "token": { + "type": "string", + "nullable": true + } + } + }, "ValidationContract": { "type": "object", "additionalProperties": false, diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj index 508f2f0..aee74a7 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.6 + 0.0.0.7 client generated code. EasyMicroservices@gmail.com microservice,Identity,Identity,client diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Contexts/IdentityContext.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Contexts/IdentityContext.cs index 7d157d8..00ba011 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Contexts/IdentityContext.cs +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Contexts/IdentityContext.cs @@ -1,6 +1,7 @@ //using EasyMicroservices.IdentityMicroservice.Database.Entities; using EasyMicroservices.Cores.Relational.EntityFrameworkCore; using EasyMicroservices.Cores.Relational.EntityFrameworkCore.Intrerfaces; +using EasyMicroservices.IdentityMicroservice.Database.Entities; using Microsoft.EntityFrameworkCore; namespace EasyMicroservices.IdentityMicroservice.Database.Contexts @@ -11,7 +12,7 @@ public IdentityContext(IEntityFrameworkCoreDatabaseBuilder builder) : base(build { } - //public DbSet Identity { get; set; } + public DbSet ResetPasswordToken { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Entities/ResetPasswordTokenEntity.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Entities/ResetPasswordTokenEntity.cs new file mode 100644 index 0000000..99985e4 --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Entities/ResetPasswordTokenEntity.cs @@ -0,0 +1,15 @@ +using EasyMicroservices.Cores.Interfaces; +using EasyMicroservices.IdentityMicroservice.Database.Schemas; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EasyMicroservices.IdentityMicroservice.Database.Entities +{ + public class ResetPasswordTokenEntity : ResetPasswordTokenSchema, IIdSchema + { + public long Id { get; set; } + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Schemas/ResetPasswordTokenSchema.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Schemas/ResetPasswordTokenSchema.cs new file mode 100644 index 0000000..0b18b69 --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Database/Schemas/ResetPasswordTokenSchema.cs @@ -0,0 +1,17 @@ +using EasyMicroservices.Cores.Database.Schemas; +using EasyMicroservices.Cores.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EasyMicroservices.IdentityMicroservice.Database.Schemas +{ + public class ResetPasswordTokenSchema : FullAbilitySchema + { + public string Token { get; set; } + public bool HasConsumed { get; set; } + public DateTime ExpirationDateTime { get; set; } + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/EasyMicroservices.IdentityMicroservice.Database.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/EasyMicroservices.IdentityMicroservice.Database.csproj index 39fe6db..b90cf4d 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/EasyMicroservices.IdentityMicroservice.Database.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/EasyMicroservices.IdentityMicroservice.Database.csproj @@ -18,11 +18,11 @@ - + diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/20240225190050_AddedResetPasswordTokens.Designer.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/20240225190050_AddedResetPasswordTokens.Designer.cs new file mode 100644 index 0000000..b8bdbbc --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/20240225190050_AddedResetPasswordTokens.Designer.cs @@ -0,0 +1,78 @@ +// +using System; +using EasyMicroservices.IdentityMicroservice.Database.Contexts; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EasyMicroservices.IdentityMicroservice.Migrations +{ + [DbContext(typeof(IdentityContext))] + [Migration("20240225190050_AddedResetPasswordTokens")] + partial class AddedResetPasswordTokens + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.15") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("EasyMicroservices.IdentityMicroservice.Database.Entities.ResetPasswordTokenEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreationDateTime") + .HasColumnType("datetime2"); + + b.Property("DeletedDateTime") + .HasColumnType("datetime2"); + + b.Property("ExpirationDateTime") + .HasColumnType("datetime2"); + + b.Property("HasConsumed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ModificationDateTime") + .HasColumnType("datetime2"); + + b.Property("Token") + .HasColumnType("nvarchar(max)"); + + b.Property("UniqueIdentity") + .HasColumnType("nvarchar(450)") + .UseCollation("SQL_Latin1_General_CP1_CS_AS"); + + b.HasKey("Id"); + + b.HasIndex("CreationDateTime"); + + b.HasIndex("DeletedDateTime"); + + b.HasIndex("IsDeleted"); + + b.HasIndex("ModificationDateTime"); + + b.HasIndex("UniqueIdentity"); + + b.ToTable("ResetPasswordToken"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/20240225190050_AddedResetPasswordTokens.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/20240225190050_AddedResetPasswordTokens.cs new file mode 100644 index 0000000..9c0f5fc --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/20240225190050_AddedResetPasswordTokens.cs @@ -0,0 +1,67 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EasyMicroservices.IdentityMicroservice.Migrations +{ + /// + public partial class AddedResetPasswordTokens : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "ResetPasswordToken", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + CreationDateTime = table.Column(type: "datetime2", nullable: false), + ModificationDateTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedDateTime = table.Column(type: "datetime2", nullable: true), + UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"), + Token = table.Column(type: "nvarchar(max)", nullable: true), + HasConsumed = table.Column(type: "bit", nullable: false), + ExpirationDateTime = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ResetPasswordToken", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_ResetPasswordToken_CreationDateTime", + table: "ResetPasswordToken", + column: "CreationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_ResetPasswordToken_DeletedDateTime", + table: "ResetPasswordToken", + column: "DeletedDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_ResetPasswordToken_IsDeleted", + table: "ResetPasswordToken", + column: "IsDeleted"); + + migrationBuilder.CreateIndex( + name: "IX_ResetPasswordToken_ModificationDateTime", + table: "ResetPasswordToken", + column: "ModificationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_ResetPasswordToken_UniqueIdentity", + table: "ResetPasswordToken", + column: "UniqueIdentity"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ResetPasswordToken"); + } + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/IdentityContextModelSnapshot.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/IdentityContextModelSnapshot.cs new file mode 100644 index 0000000..ecf0bda --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/Migrations/IdentityContextModelSnapshot.cs @@ -0,0 +1,75 @@ +// +using System; +using EasyMicroservices.IdentityMicroservice.Database.Contexts; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EasyMicroservices.IdentityMicroservice.Migrations +{ + [DbContext(typeof(IdentityContext))] + partial class IdentityContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.15") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("EasyMicroservices.IdentityMicroservice.Database.Entities.ResetPasswordTokenEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreationDateTime") + .HasColumnType("datetime2"); + + b.Property("DeletedDateTime") + .HasColumnType("datetime2"); + + b.Property("ExpirationDateTime") + .HasColumnType("datetime2"); + + b.Property("HasConsumed") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ModificationDateTime") + .HasColumnType("datetime2"); + + b.Property("Token") + .HasColumnType("nvarchar(max)"); + + b.Property("UniqueIdentity") + .HasColumnType("nvarchar(450)") + .UseCollation("SQL_Latin1_General_CP1_CS_AS"); + + b.HasKey("Id"); + + b.HasIndex("CreationDateTime"); + + b.HasIndex("DeletedDateTime"); + + b.HasIndex("IsDeleted"); + + b.HasIndex("ModificationDateTime"); + + b.HasIndex("UniqueIdentity"); + + b.ToTable("ResetPasswordToken"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Common/ResetPasswordTokenContract.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Common/ResetPasswordTokenContract.cs new file mode 100644 index 0000000..1f1c145 --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Common/ResetPasswordTokenContract.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EasyMicroservices.IdentityMicroservice.Contracts.Common +{ + public class ResetPasswordTokenContract + { + public long Id { get; set; } + public string Token { get; set; } + public string UniqueIdentity { get; set; } + public bool HasConsumed { get; set; } + public DateTime ExpirationDateTime { get; set; } + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/ConsumeResetPasswordTokenRequestContract.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/ConsumeResetPasswordTokenRequestContract.cs new file mode 100644 index 0000000..2c18fc7 --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/ConsumeResetPasswordTokenRequestContract.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EasyMicroservices.IdentityMicroservice.Contracts.Requests +{ + public class ConsumeResetPasswordTokenRequestContract + { + public string Token { get; set; } + public string Password { get; set; } + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/GenerateResetPasswordTokenRequestContract.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/GenerateResetPasswordTokenRequestContract.cs new file mode 100644 index 0000000..537cefd --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/GenerateResetPasswordTokenRequestContract.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EasyMicroservices.IdentityMicroservice.Contracts.Requests +{ + public class GenerateResetPasswordTokenRequestContract + { + public long ExpireTimeInSeconds { get; set; } + public string UniqueIdentity { get; set; } + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/ValidateResetPasswordTokenRequestContract.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/ValidateResetPasswordTokenRequestContract.cs new file mode 100644 index 0000000..8507789 --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/Contracts/Requests/ValidateResetPasswordTokenRequestContract.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EasyMicroservices.IdentityMicroservice.Contracts.Requests +{ + public class ValidateResetPasswordTokenRequestContract + { + public string Token { get; set; } + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/EasyMicroservices.IdentityMicroservice.Domain.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/EasyMicroservices.IdentityMicroservice.Domain.csproj index d3b376a..2ee2356 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/EasyMicroservices.IdentityMicroservice.Domain.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/EasyMicroservices.IdentityMicroservice.Domain.csproj @@ -22,7 +22,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/EasyMicroservices.IdentityMicroservice.Logics.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/EasyMicroservices.IdentityMicroservice.Logics.csproj index caa13a2..e81fde6 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/EasyMicroservices.IdentityMicroservice.Logics.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/EasyMicroservices.IdentityMicroservice.Logics.csproj @@ -17,8 +17,8 @@ - - + + diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/SecurityHelper.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/SecurityHelper.cs index a70bd79..1d1220f 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/SecurityHelper.cs +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/SecurityHelper.cs @@ -9,5 +9,16 @@ namespace EasyMicroservices.IdentityMicroservice.Helpers { public static class SecurityHelper { + public static string Hash(string password) + { + var crypt = new SHA256Managed(); + var hash = new StringBuilder(); + byte[] crypto = crypt.ComputeHash(Encoding.UTF8.GetBytes(password)); + foreach (byte theByte in crypto) + { + hash.Append(theByte.ToString("x2")); + } + return hash.ToString(); + } } } diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/AuthenticationController.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/AuthenticationController.cs index a9e341d..0a7c237 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/AuthenticationController.cs +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/AuthenticationController.cs @@ -1,14 +1,18 @@ using Contents.GeneratedServices; +using EasyMicroservices.Cores.Database.Managers; using EasyMicroservices.IdentityMicroservice.Attributes; using EasyMicroservices.IdentityMicroservice.Contracts.Common; using EasyMicroservices.IdentityMicroservice.Contracts.Requests; using EasyMicroservices.IdentityMicroservice.Contracts.Responses; +using EasyMicroservices.IdentityMicroservice.Database.Entities; +using EasyMicroservices.IdentityMicroservice.Helpers; using EasyMicroservices.IdentityMicroservice.Interfaces; using EasyMicroservices.ServiceContracts; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Security.Claims; using System.Text; +using MessageContract = EasyMicroservices.ServiceContracts.MessageContract; namespace EasyMicroservices.IdentityMicroservice.WebApi.Controllers { @@ -230,5 +234,6 @@ public async Task> LoginByPersonalAccessTo Token = token, }; } + } } diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/ResetPasswordController.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/ResetPasswordController.cs new file mode 100644 index 0000000..3e47d18 --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/ResetPasswordController.cs @@ -0,0 +1,83 @@ +using Contents.GeneratedServices; +using EasyMicroservices.Cores.AspCoreApi; +using EasyMicroservices.Cores.Database.Managers; +using EasyMicroservices.IdentityMicroservice.Attributes; +using EasyMicroservices.IdentityMicroservice.Contracts.Common; +using EasyMicroservices.IdentityMicroservice.Contracts.Requests; +using EasyMicroservices.IdentityMicroservice.Contracts.Responses; +using EasyMicroservices.IdentityMicroservice.Database.Entities; +using EasyMicroservices.IdentityMicroservice.Helpers; +using EasyMicroservices.IdentityMicroservice.Interfaces; +using EasyMicroservices.ServiceContracts; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using System.Net; +using System.Security.Claims; +using System.Text; +using MessageContract = EasyMicroservices.ServiceContracts.MessageContract; + +namespace EasyMicroservices.IdentityMicroservice.WebApi.Controllers +{ + + [ApiController] + [Route("api/[controller]/[action]")] + public class ResetPasswordController : SimpleQueryServiceController + { + private readonly IAppUnitOfWork _appUnitOfWork; + + public ResetPasswordController(IAppUnitOfWork appUnitOfWork) : base(appUnitOfWork) + { + _appUnitOfWork = appUnitOfWork; + } + + [HttpPost] + [AllowAnonymous] + public async Task GenerateResetPasswordToken(GenerateResetPasswordTokenRequestContract request) + { + var logic = _appUnitOfWork.GetContractLogic(); + + var user = await _appUnitOfWork.GetUserClient().GetByUniqueIdentityAsync(new Authentications.GeneratedServices.GetByUniqueIdentityRequestContract { UniqueIdentity = request.UniqueIdentity, Type = Authentications.GeneratedServices.GetUniqueIdentityType.All }).AsCheckedResult(x => x.Result); + + var previousToken = await logic.GetAll(x => x.Where(o => o.UniqueIdentity.StartsWith(user.UniqueIdentity))); + + if (!previousToken.IsSuccess) + await logic.UpdateBulkChangedValuesOnly(previousToken.Result.Select(x => new ResetPasswordTokenContract { Id = x.Id, HasConsumed = true}).ToList()); + + string token = SecurityHelper.Hash(Guid.NewGuid().ToString()); + + return await logic.Add(new ResetPasswordTokenContract + { + UniqueIdentity = user.UniqueIdentity, + Token = token, + ExpirationDateTime = DateTime.Now.AddSeconds(request.ExpireTimeInSeconds), + }); + } + + [HttpPost] + [AllowAnonymous] + public async Task ValidateResetPasswordToken(ValidateResetPasswordTokenRequestContract request) + { + var logic = _appUnitOfWork.GetContractLogic(); + return await logic.GetBy(x => x.Token.Equals(request.Token) && !x.HasConsumed && !x.IsDeleted && x.ExpirationDateTime >= DateTime.Now); + } + + [HttpPost] + [AllowAnonymous] + public async Task ConsumeResetPasswordToken(ConsumeResetPasswordTokenRequestContract request) + { + var logic = _appUnitOfWork.GetContractLogic(); + + var token = await logic.GetBy(x => x.Token.Equals(request.Token) && !x.HasConsumed && !x.IsDeleted && x.ExpirationDateTime >= DateTime.Now).AsCheckedResult(x => x.Result); + var user = await _appUnitOfWork.GetUserClient().GetByUniqueIdentityAsync(new Authentications.GeneratedServices.GetByUniqueIdentityRequestContract { UniqueIdentity = DefaultUniqueIdentityManager.CutUniqueIdentity(token.UniqueIdentity, 4), Type = Authentications.GeneratedServices.GetUniqueIdentityType.All }).AsCheckedResult(x => x.Result); + var updateUserResponse = await _appUnitOfWork.GetUserClient().UpdateChangedValuesOnlyAsync(new Authentications.GeneratedServices.UserContract + { + Id = user.Id, + Password = request.Password + }).AsCheckedResult(x => x.Result); + + token.HasConsumed = true; + + return await logic.UpdateChangedValuesOnly(token); + } + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/EasyMicroservices.IdentityMicroservice.WebApi.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/EasyMicroservices.IdentityMicroservice.WebApi.csproj index d6b9a07..20876f6 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/EasyMicroservices.IdentityMicroservice.WebApi.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/EasyMicroservices.IdentityMicroservice.WebApi.csproj @@ -38,5 +38,11 @@ + + + + Always + + diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Program.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Program.cs index 6eccfe4..fb0a156 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Program.cs +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Program.cs @@ -17,7 +17,8 @@ public static async Task Main(string[] args) var app = CreateBuilder(args); var build = await app.BuildWithUseCors((options) => { - + AddCors(options, + "localhost"); }, true); build.MapControllers(); diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.json b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.json index 5a5f7bd..f910fcd 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.json +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.json @@ -48,5 +48,5 @@ } }, "HasSSL": false, - "Urls": "http://*:2007" + "Urls": "http://*:2007", } diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/serilog.txt b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/serilog.txt index 3cf7413..d39110b 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/serilog.txt +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/serilog.txt @@ -1,142 +1,22 @@ -2023-12-24 23:25:35.512 +03:30 [DBG] Try login... -2023-12-24 23:25:37.460 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 69 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-24 23:29:47.211 +03:30 [DBG] Try login... -2023-12-24 23:29:47.831 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 69 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-24 23:30:00.288 +03:30 [DBG] Try login... -2023-12-24 23:30:00.740 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 69 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-25 09:23:33.812 +03:30 [DBG] Try login... -2023-12-25 09:23:34.496 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 69 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-26 19:23:34.795 +03:30 [DBG] Try login... -2023-12-26 19:23:52.372 +03:30 [DBG] Try login... -2023-12-26 19:24:33.990 +03:30 [DBG] Try login... -2023-12-26 19:25:06.481 +03:30 [DBG] Try login... -2023-12-26 19:25:07.965 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 69 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-26 19:38:34.986 +03:30 [DBG] Try login... -2023-12-26 19:38:35.399 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 69 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-26 19:42:07.241 +03:30 [DBG] Try login... -2023-12-26 19:42:07.634 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 69 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-26 19:47:14.974 +03:30 [DBG] Try login... -2023-12-26 19:47:15.900 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 69 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-26 21:07:52.200 +03:30 [DBG] Try login... -2023-12-26 21:07:56.740 +03:30 [ERR] Empty -System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:1044) - ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it. - at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) - at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) - at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) - at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) - --- End of inner exception stack trace --- - at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) - at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) - at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) - at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) - at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) - at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken) - at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) - at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) - at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) - at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) - at Authentications.GeneratedServices.UserClient.GetUserByPersonalAccessTokenAsync(PersonalAccessTokenRequestContract body, CancellationToken cancellationToken) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 76 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-27 12:46:02.258 +03:30 [DBG] Try login... -2023-12-27 12:46:03.405 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 76 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-27 12:50:03.975 +03:30 [DBG] Try login... -2023-12-27 12:50:18.983 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 76 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-27 12:50:35.795 +03:30 [DBG] Try login... -2023-12-27 12:51:13.304 +03:30 [DBG] Try login... -2023-12-27 12:51:20.998 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: Item by predicate not found! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 76 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-27 12:51:23.766 +03:30 [DBG] Try login... -2023-12-27 12:51:59.481 +03:30 [DBG] Try login... -2023-12-27 12:55:19.792 +03:30 [DBG] Try login... -2023-12-27 12:55:24.221 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMiIsInJvbGUiOiJPd25lciIsIm5iZiI6MTcwMzY2OTEyMCwiZXhwIjoxNzAzNzU1NTIwLCJpYXQiOjE3MDM2NjkxMjAsImlzcyI6Imh0dHBzOi8vZ2l0aHViLmNvbS9lYXN5bWljcm9zZXJ2aWNlcyIsImF1ZCI6ImVhc3ltaWNyb3NlcnZpY2VzIn0.dGmzIFraAlcYSEXY6zc14lY3Ivk1yX6siAObnV2EAr8 -2023-12-27 12:58:51.087 +03:30 [DBG] Try login... -2023-12-27 12:58:51.577 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMiIsInJvbGUiOiJPd25lciIsIm5iZiI6MTcwMzY2OTMzMSwiZXhwIjoxNzAzNzU1NzMxLCJpYXQiOjE3MDM2NjkzMzEsImlzcyI6Imh0dHBzOi8vZ2l0aHViLmNvbS9lYXN5bWljcm9zZXJ2aWNlcyIsImF1ZCI6ImVhc3ltaWNyb3NlcnZpY2VzIn0.CpgUWOam3lLfK37JMs_mFxecdKioivXA4L19Pf9PCik -2023-12-29 12:52:17.107 +03:30 [DBG] Try login... -2023-12-29 12:52:18.377 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMiIsInJvbGUiOiJPd25lciIsIm5iZiI6MTcwMzg0MTczOCwiZXhwIjoxNzAzOTI4MTM4LCJpYXQiOjE3MDM4NDE3MzgsImlzcyI6Imh0dHBzOi8vZ2l0aHViLmNvbS9lYXN5bWljcm9zZXJ2aWNlcyIsImF1ZCI6ImVhc3ltaWNyb3NlcnZpY2VzIn0.wNe0EYwpxeXn1iLyWISLa6B8o_FD-rYjR-DBF4glQqw -2023-12-31 00:03:16.334 +03:30 [DBG] Try login... -2023-12-31 00:03:22.319 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: No connection could be made because the target machine actively refused it. (localhost:1041) - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 83 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-31 00:05:27.386 +03:30 [DBG] Try login... -2023-12-31 00:05:46.976 +03:30 [ERR] Empty -EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: uniqueIdentity cannot be null or empty! - at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() - at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) - at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) - at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 83 - at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 -2023-12-31 00:07:02.667 +03:30 [DBG] Try login... -2024-01-01 23:44:35.443 +03:30 [DBG] Try login... -2024-01-01 23:44:38.834 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMiIsInJvbGUiOiJPd25lciIsIm5iZiI6MTcwNDE0MDA3OCwiZXhwIjoxNzA0MjI2NDc4LCJpYXQiOjE3MDQxNDAwNzgsImlzcyI6Imh0dHBzOi8vZ2l0aHViLmNvbS9lYXN5bWljcm9zZXJ2aWNlcyIsImF1ZCI6ImVhc3ltaWNyb3NlcnZpY2VzIn0.0E0XB4VI9R5irmSoJOJlnG_StcmZUjRKR7o1Dnl8ZHc +2024-02-25 00:19:30.670 +03:30 [DBG] Try login... +2024-02-25 00:19:31.694 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4MDc3NzEsImV4cCI6MTcwODg5NDE3MSwiaWF0IjoxNzA4ODA3NzcxLCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.PzQBqAho5oTGyQ7eheAhw8f1in031qgtGr-sn_APyI8 +2024-02-25 00:34:17.207 +03:30 [DBG] Try login... +2024-02-25 00:34:17.421 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4MDg2NTcsImV4cCI6MTcwODg5NTA1NywiaWF0IjoxNzA4ODA4NjU3LCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.v1A5ug9IDPNpyZ2pa6xQdi_4DD0C0KzQBVdcPiBXq9U +2024-02-25 16:52:29.331 +03:30 [DBG] Try login... +2024-02-25 16:52:33.179 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4NjczNTMsImV4cCI6MTcwODk1Mzc1MywiaWF0IjoxNzA4ODY3MzUzLCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.6Z4RPLWeaInds_lbMOiZjs78w_x3MEIfAmt7Z_ITI78 +2024-02-25 16:52:36.472 +03:30 [DBG] Try login... +2024-02-25 16:52:36.736 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4NjczNTYsImV4cCI6MTcwODk1Mzc1NiwiaWF0IjoxNzA4ODY3MzU2LCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.WP2Z2dyukbPtV0Mpw6ERB4SvDGNAeqbVV2rIl2uOMLk +2024-02-25 21:55:51.238 +03:30 [DBG] Try login... +2024-02-25 21:55:51.545 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4ODU1NTEsImV4cCI6MTcwODk3MTk1MSwiaWF0IjoxNzA4ODg1NTUxLCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.mcIszSd1C_o6_0MyZfp3zhv86H2aJLtrsTsAgAAHieU +2024-02-25 21:57:14.568 +03:30 [DBG] Try login... +2024-02-25 21:57:14.818 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4ODU2MzQsImV4cCI6MTcwODk3MjAzNCwiaWF0IjoxNzA4ODg1NjM0LCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.GKwZ8I7r4nKu3rfy01aajPI0440W4S-gM1i3KAfGwgI +2024-02-25 22:03:33.601 +03:30 [DBG] Try login... +2024-02-25 22:03:33.844 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4ODYwMTMsImV4cCI6MTcwODk3MjQxMywiaWF0IjoxNzA4ODg2MDEzLCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.gARiR2969qqe17laeaZmzb015FAUwikDRPjHrWgFTkQ +2024-02-25 22:12:42.621 +03:30 [DBG] Try login... +2024-02-25 22:12:42.860 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4ODY1NjIsImV4cCI6MTcwODk3Mjk2MiwiaWF0IjoxNzA4ODg2NTYyLCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.NuoIQ-d7sjuUJIpZZxEyEDIXmXhXz5hcQQbXcLZ_UuU +2024-02-25 22:14:27.142 +03:30 [DBG] Try login... +2024-02-25 22:14:27.380 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4ODY2NjcsImV4cCI6MTcwODk3MzA2NywiaWF0IjoxNzA4ODg2NjY3LCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.w8G6sk04_ZPaQZPR-vmS4gQUrMLIQiLga2S04pUWOTQ +2024-02-25 22:23:22.847 +03:30 [DBG] Try login... +2024-02-25 22:23:23.097 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4ODcyMDMsImV4cCI6MTcwODk3MzYwMywiaWF0IjoxNzA4ODg3MjAzLCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.DdqRpKWMe9zRutgxeI1gr8vgh-3Aogo6dhIw7t1YBZ8 +2024-02-25 22:32:30.589 +03:30 [DBG] Try login... +2024-02-25 22:32:30.833 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMi1kLTEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDg4ODc3NTAsImV4cCI6MTcwODk3NDE1MCwiaWF0IjoxNzA4ODg3NzUwLCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.05DzNbV6t6AJLfcsqgsWDaBYI0Ucu3qQ81sppIyoaqU