Auth endpoints are now functional

This commit is contained in:
2023-08-13 00:54:23 -04:00
parent a636309b5a
commit fdf286e22f
26 changed files with 705 additions and 159 deletions

View File

@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Models.db
{
public class User
{
public int Id { get; set; }
public string Email { get; set; }
[StringLength(32, MinimumLength = 3)]
public string FirstName { get; set; }
[StringLength(32, MinimumLength = 3)]
public string LastName { get; set; }
public string PasswordHash { get; set; }
public string Salt { get; set; }
}
}

View File

@ -18,26 +18,26 @@ using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Models
namespace IO.Swagger.Models.dto
{
/// <summary>
///
/// </summary>
[DataContract]
public partial class AuthLoginBody : IEquatable<AuthLoginBody>
{
{
/// <summary>
/// Gets or Sets Email
/// </summary>
[DataMember(Name="email")]
[DataMember(Name = "email")]
public string Email { get; set; }
/// <summary>
/// Gets or Sets Password
/// </summary>
[DataMember(Name="password")]
[DataMember(Name = "password")]
public string Password { get; set; }
/// <summary>
@ -85,12 +85,12 @@ namespace IO.Swagger.Models
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return
return
(
Email == other.Email ||
Email != null &&
Email.Equals(other.Email)
) &&
) &&
(
Password == other.Password ||
Password != null &&
@ -108,16 +108,16 @@ namespace IO.Swagger.Models
{
var hashCode = 41;
// Suitable nullity checks etc, of course :)
if (Email != null)
if (Email != null)
hashCode = hashCode * 59 + Email.GetHashCode();
if (Password != null)
if (Password != null)
hashCode = hashCode * 59 + Password.GetHashCode();
return hashCode;
}
}
#region Operators
#pragma warning disable 1591
#pragma warning disable 1591
public static bool operator ==(AuthLoginBody left, AuthLoginBody right)
{
@ -129,7 +129,7 @@ namespace IO.Swagger.Models
return !Equals(left, right);
}
#pragma warning restore 1591
#pragma warning restore 1591
#endregion Operators
}
}

View File

@ -18,42 +18,48 @@ using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Models
namespace IO.Swagger.Models.dto
{
/// <summary>
///
/// </summary>
[DataContract]
public partial class AuthRegisterBody : IEquatable<AuthRegisterBody>
{
{
/// <summary>
/// Gets or Sets FirstName
/// </summary>
[StringLength(32, MinimumLength=3)]
[DataMember(Name="firstName")]
[StringLength(32, MinimumLength = 3)]
[DataMember(Name = "firstName")]
[Required]
public string FirstName { get; set; }
/// <summary>
/// Gets or Sets LastName
/// </summary>
[StringLength(32, MinimumLength=3)]
[DataMember(Name="lastName")]
[StringLength(32, MinimumLength = 3)]
[DataMember(Name = "lastName")]
[Required]
public string LastName { get; set; }
/// <summary>
/// Gets or Sets Email
/// </summary>
[DataMember(Name="email")]
[DataMember(Name = "email")]
[EmailAddress(ErrorMessage = "Invalid email format.")]
[Required]
public string Email { get; set; }
/// <summary>
/// Gets or Sets Password
/// </summary>
[DataMember(Name="password")]
[DataMember(Name = "password")]
[StringLength(32, MinimumLength = 8)]
[Required]
public string Password { get; set; }
/// <summary>
@ -103,22 +109,22 @@ namespace IO.Swagger.Models
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return
return
(
FirstName == other.FirstName ||
FirstName != null &&
FirstName.Equals(other.FirstName)
) &&
) &&
(
LastName == other.LastName ||
LastName != null &&
LastName.Equals(other.LastName)
) &&
) &&
(
Email == other.Email ||
Email != null &&
Email.Equals(other.Email)
) &&
) &&
(
Password == other.Password ||
Password != null &&
@ -136,20 +142,20 @@ namespace IO.Swagger.Models
{
var hashCode = 41;
// Suitable nullity checks etc, of course :)
if (FirstName != null)
if (FirstName != null)
hashCode = hashCode * 59 + FirstName.GetHashCode();
if (LastName != null)
if (LastName != null)
hashCode = hashCode * 59 + LastName.GetHashCode();
if (Email != null)
if (Email != null)
hashCode = hashCode * 59 + Email.GetHashCode();
if (Password != null)
if (Password != null)
hashCode = hashCode * 59 + Password.GetHashCode();
return hashCode;
}
}
#region Operators
#pragma warning disable 1591
#pragma warning disable 1591
public static bool operator ==(AuthRegisterBody left, AuthRegisterBody right)
{
@ -161,7 +167,7 @@ namespace IO.Swagger.Models
return !Equals(left, right);
}
#pragma warning restore 1591
#pragma warning restore 1591
#endregion Operators
}
}

View File

@ -18,34 +18,34 @@ using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Models
namespace IO.Swagger.Models.dto
{
/// <summary>
///
/// </summary>
[DataContract]
public partial class CurrencyAddAssetBody : IEquatable<CurrencyAddAssetBody>
{
{
/// <summary>
/// Gets or Sets CollectionId
/// </summary>
[DataMember(Name="collectionId")]
[DataMember(Name = "collectionId")]
public int? CollectionId { get; set; }
/// <summary>
/// Gets or Sets AssetName
/// </summary>
[StringLength(32, MinimumLength=1)]
[DataMember(Name="assetName")]
[StringLength(32, MinimumLength = 1)]
[DataMember(Name = "assetName")]
public string AssetName { get; set; }
/// <summary>
/// Gets or Sets AssetLink
/// </summary>
[RegularExpression("/^(https?|ftp)://[^\\s/$.?#].[^\\s]*$/")]
[DataMember(Name="assetLink")]
[DataMember(Name = "assetLink")]
public string AssetLink { get; set; }
/// <summary>
@ -94,17 +94,17 @@ namespace IO.Swagger.Models
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return
return
(
CollectionId == other.CollectionId ||
CollectionId != null &&
CollectionId.Equals(other.CollectionId)
) &&
) &&
(
AssetName == other.AssetName ||
AssetName != null &&
AssetName.Equals(other.AssetName)
) &&
) &&
(
AssetLink == other.AssetLink ||
AssetLink != null &&
@ -122,18 +122,18 @@ namespace IO.Swagger.Models
{
var hashCode = 41;
// Suitable nullity checks etc, of course :)
if (CollectionId != null)
if (CollectionId != null)
hashCode = hashCode * 59 + CollectionId.GetHashCode();
if (AssetName != null)
if (AssetName != null)
hashCode = hashCode * 59 + AssetName.GetHashCode();
if (AssetLink != null)
if (AssetLink != null)
hashCode = hashCode * 59 + AssetLink.GetHashCode();
return hashCode;
}
}
#region Operators
#pragma warning disable 1591
#pragma warning disable 1591
public static bool operator ==(CurrencyAddAssetBody left, CurrencyAddAssetBody right)
{
@ -145,7 +145,7 @@ namespace IO.Swagger.Models
return !Equals(left, right);
}
#pragma warning restore 1591
#pragma warning restore 1591
#endregion Operators
}
}

View File

@ -18,28 +18,28 @@ using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Models
namespace IO.Swagger.Models.dto
{
/// <summary>
///
/// </summary>
[DataContract]
public partial class CurrencyCreateBody : IEquatable<CurrencyCreateBody>
{
{
/// <summary>
/// Gets or Sets Name
/// </summary>
[StringLength(32, MinimumLength=1)]
[DataMember(Name="name")]
[StringLength(32, MinimumLength = 1)]
[DataMember(Name = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or Sets Symbol
/// </summary>
[StringLength(4, MinimumLength=1)]
[DataMember(Name="symbol")]
[StringLength(4, MinimumLength = 1)]
[DataMember(Name = "symbol")]
public string Symbol { get; set; }
/// <summary>
@ -87,12 +87,12 @@ namespace IO.Swagger.Models
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return
return
(
Name == other.Name ||
Name != null &&
Name.Equals(other.Name)
) &&
) &&
(
Symbol == other.Symbol ||
Symbol != null &&
@ -110,16 +110,16 @@ namespace IO.Swagger.Models
{
var hashCode = 41;
// Suitable nullity checks etc, of course :)
if (Name != null)
if (Name != null)
hashCode = hashCode * 59 + Name.GetHashCode();
if (Symbol != null)
if (Symbol != null)
hashCode = hashCode * 59 + Symbol.GetHashCode();
return hashCode;
}
}
#region Operators
#pragma warning disable 1591
#pragma warning disable 1591
public static bool operator ==(CurrencyCreateBody left, CurrencyCreateBody right)
{
@ -131,7 +131,7 @@ namespace IO.Swagger.Models
return !Equals(left, right);
}
#pragma warning restore 1591
#pragma warning restore 1591
#endregion Operators
}
}

View File

@ -18,19 +18,19 @@ using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Models
namespace IO.Swagger.Models.dto
{
/// <summary>
///
/// </summary>
[DataContract]
public partial class CurrencyCreateCollectionBody : IEquatable<CurrencyCreateCollectionBody>
{
{
/// <summary>
/// Gets or Sets CollectionName
/// </summary>
[DataMember(Name="collectionName")]
[DataMember(Name = "collectionName")]
public string CollectionName { get; set; }
/// <summary>
@ -77,12 +77,12 @@ namespace IO.Swagger.Models
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return
(
return
CollectionName == other.CollectionName ||
CollectionName != null &&
CollectionName.Equals(other.CollectionName)
);
;
}
/// <summary>
@ -95,14 +95,14 @@ namespace IO.Swagger.Models
{
var hashCode = 41;
// Suitable nullity checks etc, of course :)
if (CollectionName != null)
if (CollectionName != null)
hashCode = hashCode * 59 + CollectionName.GetHashCode();
return hashCode;
}
}
#region Operators
#pragma warning disable 1591
#pragma warning disable 1591
public static bool operator ==(CurrencyCreateCollectionBody left, CurrencyCreateCollectionBody right)
{
@ -114,7 +114,7 @@ namespace IO.Swagger.Models
return !Equals(left, right);
}
#pragma warning restore 1591
#pragma warning restore 1591
#endregion Operators
}
}

View File

@ -18,26 +18,26 @@ using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Models
namespace IO.Swagger.Models.dto
{
/// <summary>
///
/// </summary>
[DataContract]
public partial class CurrencyMintBody : IEquatable<CurrencyMintBody>
{
{
/// <summary>
/// Gets or Sets CurrencyId
/// </summary>
[DataMember(Name="currencyId")]
[DataMember(Name = "currencyId")]
public int? CurrencyId { get; set; }
/// <summary>
/// Gets or Sets Amount
/// </summary>
[DataMember(Name="amount")]
[DataMember(Name = "amount")]
public decimal? Amount { get; set; }
/// <summary>
@ -85,12 +85,12 @@ namespace IO.Swagger.Models
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return
return
(
CurrencyId == other.CurrencyId ||
CurrencyId != null &&
CurrencyId.Equals(other.CurrencyId)
) &&
) &&
(
Amount == other.Amount ||
Amount != null &&
@ -108,16 +108,16 @@ namespace IO.Swagger.Models
{
var hashCode = 41;
// Suitable nullity checks etc, of course :)
if (CurrencyId != null)
if (CurrencyId != null)
hashCode = hashCode * 59 + CurrencyId.GetHashCode();
if (Amount != null)
if (Amount != null)
hashCode = hashCode * 59 + Amount.GetHashCode();
return hashCode;
}
}
#region Operators
#pragma warning disable 1591
#pragma warning disable 1591
public static bool operator ==(CurrencyMintBody left, CurrencyMintBody right)
{
@ -129,7 +129,7 @@ namespace IO.Swagger.Models
return !Equals(left, right);
}
#pragma warning restore 1591
#pragma warning restore 1591
#endregion Operators
}
}

View File

@ -18,26 +18,26 @@ using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Models
namespace IO.Swagger.Models.dto
{
/// <summary>
///
/// </summary>
[DataContract]
public partial class WalletTransferDigitalBody : IEquatable<WalletTransferDigitalBody>
{
{
/// <summary>
/// Gets or Sets Email
/// </summary>
[DataMember(Name="email")]
[DataMember(Name = "email")]
public string Email { get; set; }
/// <summary>
/// Gets or Sets AssetId
/// </summary>
[DataMember(Name="assetId")]
[DataMember(Name = "assetId")]
public int? AssetId { get; set; }
/// <summary>
@ -85,12 +85,12 @@ namespace IO.Swagger.Models
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return
return
(
Email == other.Email ||
Email != null &&
Email.Equals(other.Email)
) &&
) &&
(
AssetId == other.AssetId ||
AssetId != null &&
@ -108,16 +108,16 @@ namespace IO.Swagger.Models
{
var hashCode = 41;
// Suitable nullity checks etc, of course :)
if (Email != null)
if (Email != null)
hashCode = hashCode * 59 + Email.GetHashCode();
if (AssetId != null)
if (AssetId != null)
hashCode = hashCode * 59 + AssetId.GetHashCode();
return hashCode;
}
}
#region Operators
#pragma warning disable 1591
#pragma warning disable 1591
public static bool operator ==(WalletTransferDigitalBody left, WalletTransferDigitalBody right)
{
@ -129,7 +129,7 @@ namespace IO.Swagger.Models
return !Equals(left, right);
}
#pragma warning restore 1591
#pragma warning restore 1591
#endregion Operators
}
}

View File

@ -18,33 +18,33 @@ using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Models
namespace IO.Swagger.Models.dto
{
/// <summary>
///
/// </summary>
[DataContract]
public partial class WalletTransferPhysicalBody : IEquatable<WalletTransferPhysicalBody>
{
{
/// <summary>
/// Gets or Sets Email
/// </summary>
[DataMember(Name="email")]
[DataMember(Name = "email")]
public string Email { get; set; }
/// <summary>
/// Gets or Sets Amount
/// </summary>
[DataMember(Name="amount")]
[DataMember(Name = "amount")]
public decimal? Amount { get; set; }
/// <summary>
/// Gets or Sets CurrencyId
/// </summary>
[DataMember(Name="currencyId")]
[DataMember(Name = "currencyId")]
public int? CurrencyId { get; set; }
/// <summary>
@ -93,17 +93,17 @@ namespace IO.Swagger.Models
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return
return
(
Email == other.Email ||
Email != null &&
Email.Equals(other.Email)
) &&
) &&
(
Amount == other.Amount ||
Amount != null &&
Amount.Equals(other.Amount)
) &&
) &&
(
CurrencyId == other.CurrencyId ||
CurrencyId != null &&
@ -121,18 +121,18 @@ namespace IO.Swagger.Models
{
var hashCode = 41;
// Suitable nullity checks etc, of course :)
if (Email != null)
if (Email != null)
hashCode = hashCode * 59 + Email.GetHashCode();
if (Amount != null)
if (Amount != null)
hashCode = hashCode * 59 + Amount.GetHashCode();
if (CurrencyId != null)
if (CurrencyId != null)
hashCode = hashCode * 59 + CurrencyId.GetHashCode();
return hashCode;
}
}
#region Operators
#pragma warning disable 1591
#pragma warning disable 1591
public static bool operator ==(WalletTransferPhysicalBody left, WalletTransferPhysicalBody right)
{
@ -144,7 +144,7 @@ namespace IO.Swagger.Models
return !Equals(left, right);
}
#pragma warning restore 1591
#pragma warning restore 1591
#endregion Operators
}
}