import { DatabaseService } from "../database/database.service"; import { EnvironmentService } from "../environment/environment.service"; import { HttpRequestService } from "../http-request/http-request.service"; import { IJwtTokenPayload } from "./models/ijwt-token-payload"; export declare class AuthenticationService { private _httpRequestService; private _databaseService; private _environmentService; constructor(_httpRequestService: HttpRequestService, _databaseService: DatabaseService, _environmentService: EnvironmentService); /** * Get jwt token payload * @param token The jwt token */ getJwtTokenPayload(token: string): IJwtTokenPayload; /** * Get refresh token and refresh if needed to */ refreshToken(): Promise; /** * Will login the user in and call the API * @param username The username * @param password The password */ login(username: string, password: string): Promise; /** * Logout */ logout(): Promise; /** * This renews the authentication token * @param refreshToken The refresh authentication token */ _refreshToken(refreshToken: string, username?: string): Promise; /** * Log unauthenticated back to output for user */ private logUnauthenticated; /** * This updates the authentication token * @param tokens The current token * @param username The username */ private updateTokenInDb; }