Revert "Fix authentication mock"

This reverts commit 3d748b61b5.
This commit is contained in:
Denys Vuika
2016-06-24 11:50:32 +01:00
parent 35478f4fd6
commit 6575a6143d

View File

@@ -16,17 +16,14 @@
*/ */
import { Observable } from 'rxjs/Rx'; import { Observable } from 'rxjs/Rx';
import { AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
export class AuthenticationMock extends AlfrescoAuthenticationService { // TODO: should be extending AlfrescoAuthenticationService
export class AuthenticationMock /*extends AlfrescoAuthenticationService*/ {
constructor(settings: AlfrescoSettingsService = null) { // TODO: real auth service returns Observable<string>
super(settings); login(username: string, password: string): Observable<boolean> {
}
login(username: string, password: string): Observable<string> {
if (username === 'fake-username' && password === 'fake-password') { if (username === 'fake-username' && password === 'fake-password') {
return Observable.of('fake-token'); return Observable.of(true);
} else { } else {
return Observable.throw('Fake server error'); return Observable.throw('Fake server error');
} }