import { CookieService } from './cookie.service'; import { ErasConfigService } from './eras-config.service'; import { AuthDataService } from './data-services/auth-data.service'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/do'; import { User } from '../model/user'; export declare class AuthService { private erasConfigService; private cookieService; private configurationService; private authDataService; constructor(erasConfigService: ErasConfigService, cookieService: CookieService, configurationService: ErasConfigService, authDataService: AuthDataService); getToken(): string; /** * Clean the logged user. * * Return a observable with true if was success logout and false if had a probem */ logout(): Observable; /** * Generate a access token and sabe the authenticated user in the application * * ___returns a observable of:___ * * ``` * { * accessToken: string, * tokenType: string * user: User * } * ``` * * ___see also___: [User]{@link User} * */ login(login: string, password: string): Observable; /** * Generate a new access token based on an old. Need to be authenticaded. * * ___returns a observable of:___ * * ``` * { * token: string, * user: User * } * ``` * * ___see also___: [User]{@link User} * * @param expiration Expiration time in milliseconds. If empty, the expiration time will be the same as the original token */ renew(expiration?: number): Observable<{ token: string; user: User; }>; removeToken(): void; setToken(token: string): void; removeUser(): void; setUser(user: any): void; getUser(): any; isAuthenticated(): boolean; private decodeToken(token); isTokenExpired(token: string, offsetSeconds?: number): boolean; urlBase64Decode(str: string): string; private getTokenExpirationDate(token); }