mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Added missing definition files
This commit is contained in:
@@ -5,12 +5,52 @@ export declare class Authentication {
|
||||
token: string;
|
||||
private _host;
|
||||
private _baseUrl;
|
||||
/**
|
||||
* Constructor
|
||||
* @param http
|
||||
*/
|
||||
constructor(http: Http);
|
||||
/**
|
||||
* The method return tru if the user is logged in
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isLoggedIn(): boolean;
|
||||
/**
|
||||
* Method to delegate GET or POST login
|
||||
* @param method
|
||||
* @param username
|
||||
* @param password
|
||||
* @returns {Observable<R>|Observable<T>}
|
||||
*/
|
||||
login(method: string, username: string, password: string): Observable<void>;
|
||||
/**
|
||||
* The method provide the login with GET Request
|
||||
* @param username
|
||||
* @param password
|
||||
* @returns {Observable<R>|Observable<T>}
|
||||
*/
|
||||
loginGet(username: string, password: string): Observable<void>;
|
||||
/**
|
||||
* The method provide the login with POST Request
|
||||
* @param username
|
||||
* @param password
|
||||
* @returns {Observable<R>|Observable<T>}
|
||||
*/
|
||||
loginPost(username: string, password: string): Observable<void>;
|
||||
/**
|
||||
* The method save the toke in the localStorage
|
||||
* @param jwt
|
||||
*/
|
||||
saveJwt(jwt: any): void;
|
||||
/**
|
||||
* The method remove the token from the local storage
|
||||
* @returns {Observable<T>}
|
||||
*/
|
||||
logout(): Observable<boolean>;
|
||||
/**
|
||||
* The method write the error in the console browser
|
||||
* @param error
|
||||
* @returns {ErrorObservable}
|
||||
*/
|
||||
private handleError(error);
|
||||
}
|
||||
|
@@ -4,9 +4,26 @@ import { Authentication } from './authentication.service';
|
||||
export declare class Login {
|
||||
auth: Authentication;
|
||||
router: Router;
|
||||
method: string;
|
||||
form: ControlGroup;
|
||||
error: boolean;
|
||||
isErrorStyle(field: ControlGroup): boolean;
|
||||
/**
|
||||
* Constructor
|
||||
* @param fb
|
||||
* @param auth
|
||||
* @param router
|
||||
*/
|
||||
constructor(fb: FormBuilder, auth: Authentication, router: Router);
|
||||
/**
|
||||
* Method called on submit form
|
||||
* @param value
|
||||
* @param event
|
||||
*/
|
||||
onSubmit(value: any, event: any): void;
|
||||
/**
|
||||
* The method return if a field is valid or not
|
||||
* @param field
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isErrorStyle(field: ControlGroup): boolean;
|
||||
}
|
||||
|
Reference in New Issue
Block a user