@authllizer/ngx
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Angular X Authllizer Module

Source Code Version MIT License Bundle Size TypeScript

This module is a wrapper of Authllizer for comfortable using it in Angular X.

Example

There are Angular X example project in the source code.

Install

$ npm install --save @authllizer/ngx
# and install peer dependencies 
$ npm install --save @authllizer/core

Setup

    import { NgModule } from '@angular/core';
    import { default as AuthllizerModule, IAuthllizerOptions } from '@authllizer/ngx';

    @NgModule({
        providers: [
            AuthllizerModule.forRoot({
                // ...
            } as IAuthllizerOptions)
        ]
    })
    export class AppModule{}

Note: Authllizer auto config to use Angular HttpClient as HttpClient

Use

import { Component } from '@angular/core';
import { Authllizer } from '@authllizer/core';

@Component({...})
export class SomeComponent{

    private _auth: Authllizer;

    constructor(auth: Authllizer){
        this._auth = auth;
    }
}

Interceptor

    import { NgModule } from '@angular/core';
    import { HTTP_INTERCEPTORS } from '@angular/common/http';
    import { TokenInterceptor } from '@authllizer/ngx';

    @NgModule({
        providers: [{
            provide: HTTP_INTERCEPTORS,
            useClass: TokenInterceptor,
            multi: true
        }]
    })
    export class AppModule{}

License

Copyright © 2017 Yisrael Eliav, Licensed under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    3
  • 0.1.0
    0

Package Sidebar

Install

npm i @authllizer/ngx

Weekly Downloads

3

Version

0.2.0

License

MIT

Unpacked Size

90.2 kB

Total Files

58

Last publish

Collaborators

  • yisraelx