Options
All
  • Public
  • Public/Protected
  • All
Menu

Auth guard implementation. Dictates access to routes depending on the authentication status.

Hierarchy

  • AuthGuard

Implements

  • CanActivate

Index

Constructors

Methods

Constructors

constructor

  • Instantiates the auth guard class.

    Parameters

    • router: Router

      A service that provides navigation among views and URL manipulation capabilities.

    Returns AuthGuard

Methods

canActivate

  • canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree>
  • Returns whether navigation to a specific route is acceptable. Checks if the user has uploaded a private key.

    Parameters

    • route: ActivatedRouteSnapshot

      Contains the information about a route associated with a component loaded in an outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to traverse the router state tree.

    • state: RouterStateSnapshot

      Represents the state of the router at a moment in time.

    Returns boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree>

    true - If there is an active private key in the user's localStorage.

Generated using TypeDoc