Déplacement du module d'authentification

develop
jboinembalome 4 years ago
parent cbd9232269
commit 485d5f111d
  1. 2
      src/app/app-routing.module.ts
  2. 2
      src/app/app.module.ts
  3. 2
      src/app/collaborateurs/collaborateurs.routing.module.ts
  4. 2
      src/app/demandes-delegation/demandes-delegation.routing.module.ts
  5. 2
      src/app/demandes-formation/demandes-formation.routing.module.ts
  6. 2
      src/app/ep-saisie/ep-saisie.routing.module.ts
  7. 2
      src/app/ep/ep.routing.module.ts
  8. 2
      src/app/formations/formations.routing.module.ts
  9. 4
      src/app/home/home-assistante/home-assistante.component.ts
  10. 2
      src/app/home/home.component.ts
  11. 2
      src/app/referents/referents.routing.module.ts
  12. 0
      src/app/shared/auth/auth-config.ts
  13. 0
      src/app/shared/auth/auth-module-config.ts
  14. 0
      src/app/shared/auth/auth.guard.ts
  15. 0
      src/app/shared/auth/auth.module.ts
  16. 0
      src/app/shared/auth/auth.service.spec.ts
  17. 8
      src/app/shared/auth/auth.service.ts
  18. 2
      src/app/shared/nav-menu/nav-menu.component.ts
  19. 2
      src/silent-refresh.html

@ -5,7 +5,7 @@ import { Routes } from '@angular/router';
import { HomeComponent } from './home/';
import { AuthGuard } from './auth/auth.guard';
import { AuthGuard } from '@shared/auth/auth.guard';
import { paths_collaborateurs, paths_demandes_delegation, paths_demandes_formation,
paths_ep, paths_saisie_ep, paths_formation, paths_home, paths_referents } from '@shared/utils/paths';

@ -22,7 +22,7 @@ import { DemandesFormationModule } from './demandes-formation';
import { DemandesDelegationModule } from './demandes-delegation';
import { EpSaisieModule } from "./ep-saisie";
import { EpModule } from "./ep"
import { AuthModule } from './auth/auth.module';
import { AuthModule } from '@shared/auth/auth.module';

@ -9,7 +9,7 @@ import { EditEvaluationComponent } from './formations-collaborateur/edit-evaluat
import { paths_collaborateurs } from '@shared/utils/paths';
import { AuthGuard } from 'app/auth/auth.guard';
import { AuthGuard } from '@shared/auth/auth.guard';
/**
* Routes du module collaborateur
*/

@ -5,7 +5,7 @@ import { Routes, RouterModule } from '@angular/router';
import { DemandesDelegationComponent } from "./demandes-delegation.component";
import { DemandeDelegationComponent } from "./details-demande-delegation/demande-delegation.component";
import { AuthGuard } from 'app/auth/auth.guard';
import { AuthGuard } from '@shared/auth/auth.guard';
import { paths_demandes_delegation } from "@shared/utils/paths";

@ -6,7 +6,7 @@ import { DemandesFormationComponent } from "./demandes-formation.component";
import { DemandeFormationComponent } from "./details-demande-formation/demande-formation.component";
import { NewDemandeFormationComponent } from "./new-demande-formation/new-demande-formation.component";
import { AuthGuard } from 'app/auth/auth.guard';
import { AuthGuard } from '@shared/auth/auth.guard';
import { paths_demandes_formation } from "@shared/utils/paths";

@ -7,7 +7,7 @@ import { EpsSaisieComponent } from "./eps-saisie/eps-saisie.component";
import { EpaSaisieComponent } from "./epa-saisie/epa-saisie.component";
import { EpaSixAnsSaisieComponent } from "./epa-six-ans-saisie/epa-six-ans-saisie.component";
import { AuthGuard } from 'app/auth/auth.guard';
import { AuthGuard } from '@shared/auth/auth.guard';
import { paths_saisie_ep } from "@shared/utils/paths";

@ -18,7 +18,7 @@ import { EpCommentaireAssistantComponent } from "./ep-commentaire-assistant/ep-c
import { EpCommentaireReferentComponent } from "./ep-commentaire-referent/ep-commentaire-referent.component";
import { NewParticipantComponent } from "./ep-participants/new-participant/new-participant.component";
import { AuthGuard } from 'app/auth/auth.guard';
import { AuthGuard } from '@shared/auth/auth.guard';
import { paths_ep } from "@shared/utils/paths";
/**

@ -7,7 +7,7 @@ import { FormationComponent } from "./details-formation/formation.component";
import { NewFormationComponent } from "./new-formation/new-formation.component";
import { EditFormationComponent } from "./edit-formation/edit-formation.component";
import { AuthGuard } from 'app/auth/auth.guard';
import { AuthGuard } from '@shared/auth/auth.guard';
import { paths_formation } from "@shared/utils/paths";
/**

@ -8,7 +8,7 @@ import {MatSort} from '@angular/material/sort';
import { EpInformationDTO, CollaborateurDTO } from "@shared/api-swagger/model/models";
import { EpService } from "@shared/api-swagger/api/api";
import { AuthService } from 'app/auth/auth.service';
import { AuthService } from '@shared/auth/auth.service';
/**
@ -96,7 +96,7 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit {
*/
chargement = true;
constructor(public authService : AuthService, private service:EpService) {
constructor(private service:EpService) {
}
/**

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { AuthService } from 'app/auth/auth.service';
import { AuthService } from '@shared/auth/auth.service';
import { Role } from '@shared/utils/roles';

@ -7,7 +7,7 @@ import { DetailsReferentComponent } from "./details-referent/details-referent.co
import { paths_referents } from "@shared/utils/paths";
import { AuthGuard } from 'app/auth/auth.guard';
import { AuthGuard } from '@shared/auth/auth.guard';
/**
* Routes du module référents

@ -70,7 +70,7 @@ export class AuthService {
return;
}
console.warn("Changements remarqués dans l'access_token (très probablement depuis un autre onglet). Mise à jour de l'observable isAuthenticated.") ;
//console.warn("Changements remarqués dans l'access_token (très probablement depuis un autre onglet). Mise à jour de l'observable isAuthenticated.") ;
this.isAuthenticatedSubject$.next(this.oauthService.hasValidAccessToken());
// Si l'acces_token n'est pas valide, on redirige l'utilisateur vers la page de connexion
@ -104,8 +104,8 @@ export class AuthService {
*/
public runInitialLoginSequence(): Promise<void> {
if (location.hash) {
console.log("Fragment de hachage rencontré, tracé sous forme de tableau...") ;
console.table(location.hash.substr(1).split('&').map(kvp => kvp.split('=')));
//console.log("Fragment de hachage rencontré, tracé sous forme de tableau...") ;
//console.table(location.hash.substr(1).split('&').map(kvp => kvp.split('=')));
}
// 0. CONFIGURATION DU CHARGEMENT:
@ -170,7 +170,7 @@ export class AuthService {
if (stateUrl.startsWith('/') === false) {
stateUrl = decodeURIComponent(stateUrl);
}
console.log(`Il y a eu l'état de ${this.oauthService.state}, donc nous vous envoyons à ${stateUrl}`) ;
//console.log(`Il y a eu l'état de ${this.oauthService.state}, donc nous vous envoyons à ${stateUrl}`) ;
this.router.navigateByUrl(stateUrl);
}
})

@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { AuthService } from 'app/auth/auth.service';
import { AuthService } from '@shared/auth/auth.service';
import { Role } from '@shared/utils/roles';

@ -22,7 +22,7 @@
let message = isResponse(location.hash) ? location.hash : '#' + location.search;
console.log("Rafraîchissement silencieux de l'iframe affichée dans l'application parente, message: ", message);
//console.log("Rafraîchissement silencieux de l'iframe affichée dans l'application parente, message: ", message);
(window.opener || window.parent).postMessage(message, location.origin);
</script>

Loading…
Cancel
Save