0.0.4 • Published 5 years ago

@madcoders/angular-authentication v0.0.4

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

angular-jwt-auth

Use Auth Service

1. Import AngularJwtAuthService into component

constructor(...
            private authService: AngularJwtAuthService,
            ...) {}
  ...
];

2. After success login set jwt token

  this.authService.setAuthToken(data.token);

AngularJwtAuthService methods

public getAuthToken(): string {}

public setAuthToken(token: string): void {}

public removeToken(): void {}

public isTokenExpired(): boolean {}