
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ngx-api-utils
Advanced tools
[](https://www.npmjs.com/ngx-api-utils)
ngx-api-utils is a lean library of utilities and helpers to quickly integrate any HTTP API (REST, Ajax, and any other) with Angular.
Inspired by:
Thanks to the respective developers, people and contributors of:
To install the package from npm - run npm install ngx-api-utils
import { NgxApiUtilsModule } from 'ngx-api-utils';
@NgModule({
...
imports: [NgxApiUtilsModule,...]
...
})
export class AppModule { }
The package consists of couple of main services and a module that you would use:
AuthTokenService to allow you to easily work with any kind of tokens, including but not limited to JWT, Oauth2 with JWT container, etc.
TokenDecoderTokenPayload by extending it with the properties you have in the token especially if you are using JWT Token or other that can contain relevant for your application informationTokenStorage implementation especially if you are not happy with the default localStorageApiHttpService that behaves 100% like Angular's HttpClient, but helps you by utilizing for you
AuthTokenService internally and sending the token on each request using ApiAuthorizationHeaderInterceptorAPI_HTTP_BASE_URLApiDefaultHeadersInterceptorApiErrorsInterceptor and read through it the last errorHttpClient, just provide it like the defaults are provided with API_HTTP_INTERCEPTORS injection token e.g. {provide: API_HTTP_INTERCEPTORS, useClass: YourCoolInterceptor, multi: true} to line up with the rest of the default provided API_HTTP_INTERCEPTORSApiAuthGuardService that is a perfectly sane option of you just have public and private part that needs to be protected based on AuthTokenService validity and you want a bit more
API_AUTH_GUARD_URL_FOR_AUTHENTICATED and API_AUTH_GUARD_URL_FOR_AUTHENTICATION, also a RegExp for API_AUTH_GUARD_PUBLIC_ONLY_ROUTESNgxApiUtilsModule that provides a default set of interceptors for API_HTTP_INTERCEPTORS used by the ApiHttpService which you can configure through providing your own values for the relevant injection tokensFor more details, please check:
This repository contains a Demo app (TBD) that is intended to show a bit more complex app and how the ngx-api-utils package fits in.
In the demo beside the usage of ngx-api-utils I would strongly recommend checking:
ngx-api-utils (TBD)The project uses the following things, you should get familiar with:
npm run startnpm run startnpm run e2e (TBD)ngx-api-utils package itself through npm run ngx-api-utils:buildnpm run ngx-api-utils:testPlease feel free to submit PRs for the following things:
We highly appreciate your contribution!
FAQs
[](https://www.npmjs.com/ngx-api-utils)
We found that ngx-api-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.