app/core/services/auth.service.ts
Properties |
constructor(util: UtilService)
|
||||||
Defined in app/core/services/auth.service.ts:15
|
||||||
Parameters :
|
keycloak |
Default value : new ReplaySubject(1)
|
Defined in app/core/services/auth.service.ts:15
|
Public util |
Type : UtilService
|
Defined in app/core/services/auth.service.ts:18
|
import { ReplaySubject } from 'rxjs';
import { UtilService } from './util-service/util.service';
import { Injectable } from '@angular/core';
@Injectable()
export class AuthService {
keycloak = new ReplaySubject(1);
constructor(
public util: UtilService
) {
// const conf = window['CLIENT_CONFIG'].keycloakAdapterConfig;
// this.util.loadScript(conf.url + '/js/keycloak.js', () => {
// const keycloak = new window['Keycloak'](conf);
// keycloak.init({ onLoad: 'check-sso', checkLoginIframe: false }).success(authenticated => {
// console.log(authenticated ? 'authenticated' : 'not authenticated');
// this.keycloak.next(keycloak);
// window['kc'] = keycloak;
// }).error(() => {
// console.log('failed to initialize');
// });
// });
}
}