import { AfterViewInit, OnInit } from "@angular/core"; import { Router } from "@angular/router"; import { TranslateService } from "@ngx-translate/core"; import { OAuthService, OAuthStorage } from "angular-oauth2-oidc"; import { Environment } from "../core/env"; import { UserProfileService } from "../backend/user-profile.service"; import { UserProfile } from "../entities/person.entity"; import { OauthAuthenticationService } from "./authentication.service"; export interface OauthInfo { serverHost: string; loginUrl: string; tokenEndpoint: string; userInfoEndpoint: string; appHost: string; appName: string; oauthRedirectUri: string; oauthClientId: string; oauthScope: string; } /** * Represents a component used to authenticate. * * In order to use this component with the correct i18n, you must include * (in your i18n translate files that are in the folder `assets\i18n`) * a translation key of name "TOCO_AUTHENTICATION" that contains * an object as value with the translation needed by this component. * * In the case of `es.json` file, you must include the following translation key: "TOCO_AUTHENTICATION": { "MAT_CARD_TITLE_AUTH": "Autenticación con", "AUTENTICARSE": "Autenticarse", "H1_HOLA": "Hola", "BUTTON_SALIR": "Salir" } * * In the case of `en.json` file, you must include the following translation key: "TOCO_AUTHENTICATION": { "MAT_CARD_TITLE_AUTH": "Authentication with", "AUTENTICARSE": "Log in", "H1_HOLA": "Hello,", "BUTTON_SALIR": "Exit" } * * If you have another language, then you have another `*.json` file, * and you must include the "TOCO_AUTHENTICATION" translation key with the correct translation values. */ export declare class AuthenticationComponent implements OnInit, AfterViewInit { private userProfileService; private env; private router; private oauthService; private oauthStorage; private authenticationService; private _transServ; isButtonLogin: boolean; isButtonLoginIcon: boolean; isButtonLoginText: string; oauthInfo: OauthInfo; user: UserProfile; userName: string; private timerAuthenticateSuscription; private timerAuthenticateObserver; constructor(userProfileService: UserProfileService, env: Environment, router: Router, oauthService: OAuthService, oauthStorage: OAuthStorage, authenticationService: OauthAuthenticationService, _transServ: TranslateService); ngOnInit(): void; ngOnDestroy(): void; ngAfterViewInit(): void; /** * Configurations to authenticate */ private configure; /** * Starts the login flow */ login(): void; /** * Ends the login flow */ logoff(): void; /** * Gives the user's email if the user is authenticated */ readonly name: string; }