UNPKG

@stardyn/angular-auth

Version:

Angular Authentication Service - Lightweight, configurable authentication service for Angular applications with token management and role-based access control

12 lines (11 loc) 673 B
import { CanActivate, CanActivateChild, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; import { AuthService } from '../services/AuthService'; export declare class AuthGuard implements CanActivate, CanActivateChild { private authService; private router; constructor(authService: AuthService, router: Router); canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean; canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean; private checkAuth; }