migrate to identity for authentication
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 12s
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 12s
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
public class RegisterDto {
|
||||
|
||||
public string Name { get; set; } = "";
|
||||
public string UserName { get; set; } = "";
|
||||
public string Email { get; set; } = "";
|
||||
public string Password { get; set; } = "";
|
||||
|
||||
@@ -9,7 +9,7 @@ public class RegisterDto {
|
||||
|
||||
public class LoginDto {
|
||||
|
||||
public string Name { get; set; } = "";
|
||||
public string UserName { get; set; } = "";
|
||||
public string Password { get; set; } = "";
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,32 @@
|
||||
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace agologumApi.Models;
|
||||
|
||||
public class User {
|
||||
public class User : IdentityUser {
|
||||
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = "";
|
||||
public string Email { get; set; } = "";
|
||||
public string PasswordHash { get; set; } = "";
|
||||
public string Role { get; set; } = "";
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
// properties inherited from IdentityUser:
|
||||
/*
|
||||
AccessFailedCount: Gets or sets the number of failed login attempts for the current user.
|
||||
Claims: Navigation property for the claims this user possesses.
|
||||
ConcurrencyStamp: A random value that must change whenever a user is persisted to the store
|
||||
Email: Gets or sets the email address for this user.
|
||||
EmailConfirmed: Gets or sets a flag indicating if a user has confirmed their email address.
|
||||
Id: Gets or sets the primary key for this user.
|
||||
LockoutEnabled: Gets or sets a flag indicating if the user could be locked out.
|
||||
LockoutEnd: Gets or sets the date and time, in UTC, when any user lockout ends.
|
||||
Logins: Navigation property for this users login accounts.
|
||||
NormalizedEmail: Gets or sets the normalized email address for this user.
|
||||
NormalizedUserName: Gets or sets the normalized user name for this user.
|
||||
PasswordHash: Gets or sets a salted and hashed representation of the password for this user.
|
||||
PhoneNumber: Gets or sets a telephone number for the user.
|
||||
PhoneNumberConfirmed: Gets or sets a flag indicating if a user has confirmed their telephone address.
|
||||
Roles: Navigation property for the roles this user belongs to.
|
||||
SecurityStamp: A random value that must change whenever a users credentials change (password changed, login removed)
|
||||
TwoFactorEnabled: Gets or sets a flag indicating if two factor authentication is enabled for this user.
|
||||
UserName: Gets or sets the user name for this user.
|
||||
https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.entityframeworkcore.identityuser?view=aspnetcore-1.1
|
||||
*/
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user