Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JwtInterceptor<Credentials, AuthResponse, UserInfo, UserId>

An HttpInterceptor, that adds a header containing fresh JWT access token to every http request. The header is configured by the JwtConfig.authHeader. If no fresh JWT is available (refresh token expired), will still make the request without JWT.

Type Parameters

  • Credentials

  • AuthResponse

  • UserInfo

  • UserId = number

Hierarchy

  • JwtInterceptor

Implements

  • HttpInterceptor

Index

Constructors

  • new JwtInterceptor<Credentials, AuthResponse, UserInfo, UserId>(config: JwtConfig<Credentials, AuthResponse, UserInfo, UserId>, jwtService: JwtService<Credentials, AuthResponse, UserInfo, UserId>): JwtInterceptor<Credentials, AuthResponse, UserInfo, UserId>

Methods

  • addAccessToken(req: HttpRequest<any>, accessJwt: JwtInfo): HttpRequest<any>
  • intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>

Generated using TypeDoc