feat: auth, compression, jwt, paste wip, roles, ratelimiting

This commit is contained in:
2025-11-24 21:50:26 -05:00
parent 050f0bc935
commit 6ec1a7fa7b
26 changed files with 611 additions and 473 deletions
+10
View File
@@ -0,0 +1,10 @@
namespace SharpbinV3.DTOs
{
public class JWTResult
{
public string? Token { get; set; }
public string? RefreshToken { get; set; }
public bool Success { get; set; }
public List<string>? Errors { get; set; }
}
}
+14
View File
@@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace SharpbinV3.DTOs
{
public class LoginRequest
{
[StringLength(50, MinimumLength = 3)]
public string? Username { get; set; }
[EmailAddress]
public string? Email { get; set; }
[StringLength(128, MinimumLength = 6)]
public string? Password { get; set; }
}
}
+12
View File
@@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace SharpbinV3.DTOs
{
public class RefreshTokenRequest
{
[Required]
public required string Token { get; set; }
[Required]
public required string RefreshToken { get; set; }
}
}
@@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations;
namespace SharpbinV3.DTOs
{
public class CreateUserDto
public class RegisterRequest
{
[Required]
[StringLength(50, MinimumLength = 3)]