UNPKG

@mercury-labs/nest-auth

Version:

Mercury framework auth library. It supports local auth, jwt with both bearer token and cookie, basic auth.

18 lines (17 loc) 922 B
import { EventBus } from '@nestjs/cqrs'; import { Observable } from 'rxjs'; import { IAuthDefinitions, IAuthResponse, IAuthUserEntityForResponse } from '../definitions'; import { AuthRepository } from '../repositories'; import { TokenService } from '../services'; export interface IGetUserByApiKeyActionOptions { apiKey: string; } export declare class GetUserByApiKeyAction { readonly authDefinitions: IAuthDefinitions; protected readonly authRepository: AuthRepository; protected readonly tokenService: TokenService; protected readonly jwtService: TokenService; protected readonly eventBus: EventBus; constructor(authDefinitions: IAuthDefinitions, authRepository: AuthRepository, tokenService: TokenService, jwtService: TokenService, eventBus: EventBus); handle<T extends IAuthUserEntityForResponse>({ apiKey, }: IGetUserByApiKeyActionOptions): Observable<IAuthResponse<T> | undefined>; }