File

app/core/services/auth.service.ts

Index

Properties

Constructor

constructor(util: UtilService)
Parameters :
Name Type Optional
util UtilService No

Properties

keycloak
Default value : new ReplaySubject(1)
Public util
Type : UtilService
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');
		// 	});

		// });

	}

}

result-matching ""

    No results matching ""