[ADF-3181] Auth Guard - redirect by string url (#3474)

* redirect by string url

* auth guard tests fix

* revise
This commit is contained in:
Cilibiu Bogdan
2018-06-14 12:19:34 +03:00
committed by Eugenio Romano
parent 0cf2a35983
commit c0de0d5087
12 changed files with 55 additions and 111 deletions

View File

@@ -21,14 +21,14 @@ import { RedirectionModel } from '../models/redirection.model';
// TODO: should be extending AuthenticationService
export class AuthenticationMock /*extends AuthenticationService*/ {
private redirect: RedirectionModel = null;
private redirectUrl: RedirectionModel = null;
setRedirectUrl(url: RedirectionModel) {
this.redirect = url;
this.redirectUrl = url;
}
getRedirectUrl(): any[] {
return this.redirect ? this.redirect.navigation : null;
getRedirectUrl(): string|null {
return this.redirectUrl ? this.redirectUrl.url : null;
}
// TODO: real auth service returns Observable<string>