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) 920 B
import { EventBus } from '@nestjs/cqrs'; import { Observable } from 'rxjs'; import { IAuthDefinitions, IRefreshTokenAuthResponse } from '../definitions'; import { AuthRepository } from '../repositories'; import { TokenService } from '../services'; export interface IGetUserByRefreshTokenActionOptions { refreshToken: string; } export declare class GetUserByRefreshTokenAction { 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 IRefreshTokenAuthResponse>({ refreshToken, }: IGetUserByRefreshTokenActionOptions): Observable<T | undefined>; }