Add logout and login functionality
This commit is contained in:
parent
f10de66c12
commit
53f21a220f
2 changed files with 7 additions and 1 deletions
|
@ -0,0 +1 @@
|
||||||
|
<button (click)="login()">Login</button>
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component } from '@angular/core';
|
import {Component, inject} from '@angular/core';
|
||||||
|
import {KeycloakService} from "keycloak-angular";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-landing-page',
|
selector: 'app-landing-page',
|
||||||
|
@ -7,5 +8,9 @@ import { Component } from '@angular/core';
|
||||||
templateUrl: './landing-page.component.html',
|
templateUrl: './landing-page.component.html',
|
||||||
})
|
})
|
||||||
export class LandingPageComponent {
|
export class LandingPageComponent {
|
||||||
|
private keycloakService: KeycloakService = inject(KeycloakService);
|
||||||
|
|
||||||
|
login() {
|
||||||
|
this.keycloakService.login();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue