Ignore:
Timestamp:
06/23/26 15:20:39 (13 days ago)
Author:
kikisrbinoska <srbinoskakristina07@…>
Branches:
main
Children:
0b502c2
Parents:
d300631
Message:

Fixes for authentication and auhtorization\

Location:
ChapterX.Application/Auth
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChapterX.Application/Auth/LoginRequest.cs

    rd300631 rb373fea  
    11using MediatR;
     2using System.ComponentModel.DataAnnotations;
    23
    34namespace ChapterX.Application.Auth
    45{
    5     public record LoginRequest(string Email, string Password) : IRequest<LoginResponse>;
     6    public record LoginRequest(
     7        [Required][EmailAddress][MaxLength(200)] string Email,
     8        [Required][MaxLength(128)] string Password
     9    ) : IRequest<LoginResponse>;
    610}
  • ChapterX.Application/Auth/RegisterRequest.cs

    rd300631 rb373fea  
    11using MediatR;
     2using System.ComponentModel.DataAnnotations;
    23
    34namespace ChapterX.Application.Auth
    45{
    5     public record RegisterRequest(string Username, string Email, string Name, string Surname, string Password) : IRequest<RegisterResponse>;
     6    public record RegisterRequest(
     7        [Required][MaxLength(50)] string Username,
     8        [Required][EmailAddress][MaxLength(200)] string Email,
     9        [Required][MaxLength(100)] string Name,
     10        [Required][MaxLength(100)] string Surname,
     11        [Required][MinLength(8)][MaxLength(128)] string Password
     12    ) : IRequest<RegisterResponse>;
    613}
Note: See TracChangeset for help on using the changeset viewer.