refactor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* In-memory implementation of IAchievementRepository
|
||||
*/
|
||||
|
||||
import { Logger } from '@gridpilot/core/shared/application';
|
||||
import { Logger } from '@core/shared/application';
|
||||
import {
|
||||
Achievement,
|
||||
AchievementCategory,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { IAuthRepository } from '@gridpilot/core/identity/domain/repositories/IAuthRepository';
|
||||
import { IUserRepository, StoredUser } from '@gridpilot/core/identity/domain/repositories/IUserRepository';
|
||||
import { IPasswordHashingService } from '@gridpilot/core/identity/domain/services/PasswordHashingService';
|
||||
import { User } from '@gridpilot/core/identity/domain/entities/User';
|
||||
import { IAuthRepository } from '@core/identity/domain/repositories/IAuthRepository';
|
||||
import { IUserRepository, StoredUser } from '@core/identity/domain/repositories/IUserRepository';
|
||||
import { IPasswordHashingService } from '@core/identity/domain/services/PasswordHashingService';
|
||||
import { User } from '@core/identity/domain/entities/User';
|
||||
|
||||
import { EmailAddress } from '@gridpilot/core/identity/domain/value-objects/EmailAddress';
|
||||
import { EmailAddress } from '@core/identity/domain/value-objects/EmailAddress';
|
||||
import { randomUUID } from 'crypto';
|
||||
import { Logger } from '@gridpilot/core/shared/application';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryAuthRepository implements IAuthRepository {
|
||||
constructor(
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import type { ISponsorAccountRepository } from '../../domain/repositories/ISponsorAccountRepository';
|
||||
import type { SponsorAccount } from '../../domain/entities/SponsorAccount';
|
||||
import type { UserId } from '../../domain/value-objects/UserId';
|
||||
import { Logger } from '@gridpilot/core/shared/application';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemorySponsorAccountRepository implements ISponsorAccountRepository {
|
||||
private accounts: Map<string, SponsorAccount> = new Map();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { UserRating } from '../../domain/value-objects/UserRating';
|
||||
import type { IUserRatingRepository } from '../../domain/repositories/IUserRatingRepository';
|
||||
import { Logger } from '@gridpilot/core/shared/application';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryUserRatingRepository implements IUserRatingRepository {
|
||||
private ratings: Map<string, UserRating> = new Map();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Stores users in memory for demo/development purposes.
|
||||
*/
|
||||
|
||||
import { Logger } from '@gridpilot/core/shared/application';
|
||||
import { Logger } from '@core/shared/application';
|
||||
import type { IUserRepository, StoredUser } from '../../domain/repositories/IUserRepository';
|
||||
|
||||
export class InMemoryUserRepository implements IUserRepository {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* NOT FOR PRODUCTION USE - uses a simple string reversal as "hashing".
|
||||
*/
|
||||
|
||||
import type { IPasswordHashingService } from '@gridpilot/core/identity/domain/services/PasswordHashingService';
|
||||
import type { IPasswordHashingService } from '@core/identity/domain/services/PasswordHashingService';
|
||||
|
||||
export class InMemoryPasswordHashingService implements IPasswordHashingService {
|
||||
async hash(plain: string): Promise<string> {
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
* Manages user session using cookies. This is a placeholder implementation.
|
||||
*/
|
||||
|
||||
import type { AuthenticatedUserDTO } from '@gridpilot/core/identity/application/dto/AuthenticatedUserDTO';
|
||||
import type { AuthSessionDTO } from '@gridpilot/core/identity/application/dto/AuthSessionDTO';
|
||||
import type { IdentitySessionPort } from '@gridpilot/core/identity/application/ports/IdentitySessionPort';
|
||||
import { Logger } from '@gridpilot/core/shared/application';
|
||||
import type { AuthenticatedUserDTO } from '@core/identity/application/dto/AuthenticatedUserDTO';
|
||||
import type { AuthSessionDTO } from '@core/identity/application/dto/AuthSessionDTO';
|
||||
import type { IdentitySessionPort } from '@core/identity/application/ports/IdentitySessionPort';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class CookieIdentitySessionAdapter implements IdentitySessionPort {
|
||||
private currentSession: AuthSessionDTO | null = null;
|
||||
|
||||
Reference in New Issue
Block a user