server cleanup

This commit is contained in:
hamid
2026-06-16 01:46:53 +03:30
parent 69bbd28bb0
commit 5b4c0d183f
205 changed files with 641 additions and 628 deletions
@@ -0,0 +1,80 @@
using Microsoft.AspNetCore.Identity;
namespace Baya.Infrastructure.Identity.Identity;
public class AppErrorDescriber:IdentityErrorDescriber
{
public override IdentityError DefaultError()
{
return new IdentityError
{
Code = "DefaultError",
Description = "There was an error"
};
}
public override IdentityError DuplicateEmail(string email)
{
return new IdentityError
{
Code = nameof(DuplicateEmail),
Description = "Specified email already exists"
};
}
public override IdentityError DuplicateUserName(string userName)
{
return new IdentityError
{
Code = nameof(DuplicateUserName),
Description = "specified username already exists"
};
}
public override IdentityError PasswordMismatch()
{
return new IdentityError
{
Code = nameof(PasswordMismatch),
Description = "Incorrect password"
};
}
public override IdentityError PasswordTooShort(int length)
{
return new IdentityError
{
Code = nameof(PasswordTooShort),
Description = "Invalid password. Password is to short"
};
}
public override IdentityError InvalidUserName(string userName)
{
return new IdentityError
{
Code = nameof(InvalidUserName),
Description = "Invalid username"
};
}
public override IdentityError InvalidEmail(string email)
{
return new IdentityError
{
Code = nameof(InvalidEmail),
Description = "Invalid email"
};
}
public override IdentityError InvalidToken()
{
return new IdentityError
{
Code = nameof(InvalidToken),
Description = "Invalid given code. Please try again"
};
}
}