Some checks failed
Publish Container / publish (push) Has been cancelled
- Removed Entity Framework Core identity schema and related migrations. - Introduced MongoDB-based authentication service with user seeding functionality. - Updated Program.cs to configure authentication and authorization using cookies. - Created new Login.razor component for user login interface. - Added RedirectToLogin component for handling unauthorized access. - Updated Dockerfile and docker-compose files for development and production environments. - Removed SQLite connection strings and related configurations. - Added MongoDB connection settings in appsettings.json and Docker configurations. - Implemented IMongoAuthService interface and MongoAuthService class for user management. - Created MongoAuthUser model for MongoDB user representation.
20 lines
534 B
C#
20 lines
534 B
C#
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
namespace WorkTracker.Services.Auth;
|
|
|
|
public sealed class MongoAuthUser
|
|
{
|
|
[BsonId]
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
|
public string Id { get; init; } = string.Empty;
|
|
|
|
[BsonElement("email")]
|
|
public string Email { get; init; } = string.Empty;
|
|
|
|
[BsonElement("emailNormalized")]
|
|
public string EmailNormalized { get; init; } = string.Empty;
|
|
|
|
[BsonElement("passwordHash")]
|
|
public string PasswordHash { get; init; } = string.Empty;
|
|
}
|