0.3.0 • Published 2 years ago

@hxui/auth v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

HXUI Auth

An Angular library for managing authentication with Helix microfrontends.

Installation

npm i @hxui/auth

Usage

Import into app module.

import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { AuthModule, AUTH_CLIENT_CONFIG, TokenInterceptorService } from '@hxui/auth';
import { authConfig } from 'path/to/auth/config';

@NgModule({
  imports: [HttpClientModule, AuthModule],
  providers: [
    {
      provide: AUTH_CLIENT_CONFIG,
      useValue: authConfig,
    },
    {
      provide: HTTP_INTERCEPTORS,
      useClass: TokenInterceptorService,
      multi: true,
    },
  ],
})
export class AppModule {}

Versions

@hxui/authAngular
0.x13.x

Build

Run ng build auth to build the project. The build artifacts will be stored in the dist/auth directory.

Publishing

After building your library with ng build auth, go to the dist folder cd dist/auth and run npm publish.

Running unit tests

Run npm run test to execute the unit tests via Jest.

License

MIT