nest-authify
Version:
Complete authentication and authorization package for NestJS - Monolith and Microservices ready with OAuth, JWT, Redis sessions
17 lines (16 loc) • 950 B
TypeScript
import { JwtService } from '@nestjs/jwt';
import { ConfigService } from '@nestjs/config';
import { BaseAuthService } from './base-auth.service';
import { ISessionStore } from '../interfaces/session-store.interface';
import { IAuthRepository } from '../interfaces/auth-repository.interface';
import { HashService } from './hash.service';
export declare class AuthService extends BaseAuthService {
constructor(jwtService: JwtService, sessionStore: ISessionStore, hashService: HashService, repository?: IAuthRepository, configService?: ConfigService);
protected getUserById(userId: string): Promise<any>;
getUserActiveSessions(userId: string): Promise<any[]>;
hasRole(user: any, role: string): boolean;
hasPermission(user: any, permission: string): boolean;
updateUserProfile(userId: string, data: Partial<any>): Promise<any>;
deactivateUser(userId: string): Promise<void>;
activateUser(userId: string): Promise<void>;
}