feat: add Keycloak authentication integration and guard
This commit is contained in:
parent
aff058a29e
commit
fe8b1a1399
7 changed files with 95 additions and 3 deletions
|
@ -3,6 +3,8 @@ import { LoginViewComponent } from './components/login-view/login-view.component
|
|||
import { MitarbeiterverwaltungViewComponent } from './components/mitarbeiterverwaltung-view/mitarbeiterverwaltung-view.component';
|
||||
import { EmployeeDetailComponent } from './components/employee-detail/employee-detail.component';
|
||||
import { QualifikatonBearbeitenViewComponent } from './components/qualifikaton-bearbeiten-view/qualifikaton-bearbeiten-view.component';
|
||||
import { KeycloakAuthGuard } from 'keycloak-angular';
|
||||
import { AuthGuard } from './service/auth.service';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
|
@ -12,6 +14,7 @@ export const routes: Routes = [
|
|||
{
|
||||
path: "mitarbeiter",
|
||||
component: MitarbeiterverwaltungViewComponent,
|
||||
canActivate: [AuthGuard],
|
||||
},
|
||||
{
|
||||
path: "mitarbeiterdetails",
|
||||
|
@ -20,5 +23,9 @@ export const routes: Routes = [
|
|||
{
|
||||
path: "qualifikationbearbeiten",
|
||||
component: QualifikatonBearbeitenViewComponent,
|
||||
},
|
||||
{
|
||||
path: "**",
|
||||
redirectTo: '',
|
||||
}
|
||||
];
|
||||
|
|
Reference in a new issue