login.component.ts 705 Bytes
Newer Older
Lukas Burgey's avatar
Lukas Burgey committed
1
import { Component } from '@angular/core';
Lukas Burgey's avatar
Lukas Burgey committed
2
import { HttpClient } from '@angular/common/http';
Lukas Burgey's avatar
Lukas Burgey committed
3

4
import { DialogService } from '../dialog.service';
Lukas Burgey's avatar
Lukas Burgey committed
5
import { UserService } from '../user.service';
Lukas Burgey's avatar
Lukas Burgey committed
6
7
8
9
10
11

@Component({
  selector: 'app-login',
  templateUrl: './login.component.html',
  styleUrls: ['./login.component.css']
})
Lukas Burgey's avatar
Lukas Burgey committed
12
13
export class LoginComponent {
  private profileDialog;
Lukas Burgey's avatar
Lukas Burgey committed
14
15
  public idps: any[];
  public selectedIdP: number;
Lukas Burgey's avatar
Lukas Burgey committed
16

Lukas Burgey's avatar
Lukas Burgey committed
17
18
  constructor(
    public userService: UserService,
19
    public dialog: DialogService,
Lukas Burgey's avatar
Lukas Burgey committed
20
21
22
23
24
25
26
27
28
    public http: HttpClient,
  ) {
    this.userService.getAuthInfo().subscribe(
      data => {
        this.idps = data['idps'];
        this.selectedIdP = data['default'];
      }
    );
  }
Lukas Burgey's avatar
Lukas Burgey committed
29
}