1 import { Injectable } from '@angular/core';
2 import { CanActivate, CanActivateChild, Router } from '@angular/router';
4 import { AuthStorageService } from './auth-storage.service';
7 * This service checks if a route can be activated if the user has not
8 * been logged in via SSO.
13 export class NoSsoGuardService implements CanActivate, CanActivateChild {
14 constructor(private authStorageService: AuthStorageService, private router: Router) {}
17 if (!this.authStorageService.isSSO()) {
20 this.router.navigate(['404']);
24 canActivateChild(): boolean {
25 return this.canActivate();