UNPKG

@devlearning/jwt-auth

Version:

Jwt Angular Authentication manager with automatic Refresh Token management.

16 lines (15 loc) 856 B
import { HttpEvent, HttpHandler, HttpInterceptor, HttpInterceptorFn, HttpRequest } from '@angular/common/http'; import { Observable } from 'rxjs'; import { JwtAuthService } from './jwt-auth.service'; import { JwtAuthConfig } from './models/jwt-auth-config'; import { JwtTokenBase } from './models/jwt-token-base'; import * as i0 from "@angular/core"; export declare const jwtAuthInterceptorFn: HttpInterceptorFn; export declare class JwtAuthInterceptor implements HttpInterceptor { private readonly jwtAuth; private readonly config; constructor(jwtAuth: JwtAuthService<JwtTokenBase>, config: JwtAuthConfig); intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>; static ɵfac: i0.ɵɵFactoryDeclaration<JwtAuthInterceptor, never>; static ɵprov: i0.ɵɵInjectableDeclaration<JwtAuthInterceptor>; }