[@rxap/authentication](../wiki/globals) / RxapAuthenticationGuard

# Class: RxapAuthenticationGuard

Defined in: [authentication.guard.ts:16](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/authentication/src/lib/authentication.guard.ts#L16)

## Constructors

### new RxapAuthenticationGuard()

> **new RxapAuthenticationGuard**(`authentication`, `router`, `deactivated`): [`RxapAuthenticationGuard`](../wiki/Class.RxapAuthenticationGuard)

Defined in: [authentication.guard.ts:20](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/authentication/src/lib/authentication.guard.ts#L20)

#### Parameters

##### authentication

[`RxapAuthenticationService`](../wiki/Class.RxapAuthenticationService)

##### router

`Router`

##### deactivated

`null` | `boolean`

#### Returns

[`RxapAuthenticationGuard`](../wiki/Class.RxapAuthenticationGuard)

## Properties

### authentication

> **authentication**: [`RxapAuthenticationService`](../wiki/Class.RxapAuthenticationService)

Defined in: [authentication.guard.ts:22](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/authentication/src/lib/authentication.guard.ts#L22)

***

### lastUrl

> **lastUrl**: `null` \| `string` = `null`

Defined in: [authentication.guard.ts:18](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/authentication/src/lib/authentication.guard.ts#L18)

***

### router

> **router**: `Router`

Defined in: [authentication.guard.ts:24](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/authentication/src/lib/authentication.guard.ts#L24)

## Methods

### canActivate()

> **canActivate**(`route`, `state`): `Promise`\<`boolean` \| `UrlTree`\>

Defined in: [authentication.guard.ts:31](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/authentication/src/lib/authentication.guard.ts#L31)

#### Parameters

##### route

`ActivatedRouteSnapshot`

##### state

`RouterStateSnapshot`

#### Returns

`Promise`\<`boolean` \| `UrlTree`\>

***

### canActivateChild()

> **canActivateChild**(`childRoute`, `state`): `Promise`\<`boolean` \| `UrlTree`\>

Defined in: [authentication.guard.ts:39](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/authentication/src/lib/authentication.guard.ts#L39)

#### Parameters

##### childRoute

`ActivatedRouteSnapshot`

##### state

`RouterStateSnapshot`

#### Returns

`Promise`\<`boolean` \| `UrlTree`\>
