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

### Hierarchy

- AuthGuard

### Implements

- CanActivate

## Index

### Constructors

- constructor

### Methods

- canActivate

## Constructors

### constructor

- new AuthGuard(router: Router): AuthGuard

- - Defined in src/app/_guards/auth.guard.ts:21

  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>

- Implementation of CanActivate.canActivate

  - Defined in src/app/_guards/auth.guard.ts:38

  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