99.0.0 • Published 9 months ago

anti-tamper v99.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Getting started

Installation

angular 17+
npm i anti-tamper

angular <= 16
npm i anti-tamper@1.4.0

Import

No import required in app.module.ts

Usage Typescript

In your interceptor:

import { DigestHeaderService } from 'anti-tamper';
import { from, Observable } from 'rxjs';
.
.
.
export class HeaderInterceptor implements HttpInterceptor {
  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
    .
    .
    .
    const headers : HttpRequest<any> = req.clone({
      headers: req.headers.set('Authorization', `Bearer ${token}`)
    });

    return from (DigestHeaderService.add(headers, key, iv))
    .pipe(
      switchMap(headers_digest => {
        return next.handle(headers_digest);
      })
    );
  }
}
99.0.0

9 months ago

1.5.0

1 year ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

0.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago