mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Removed parseSSOlocation() from auth.service
This commit is contained in:
@@ -140,8 +140,7 @@ describe('AuthService test', () => {
|
|||||||
{ provide: AuthRequestService, useValue: authRequest },
|
{ provide: AuthRequestService, useValue: authRequest },
|
||||||
{ provide: REQUEST, useValue: {} },
|
{ provide: REQUEST, useValue: {} },
|
||||||
{ provide: Router, useValue: routerStub },
|
{ provide: Router, useValue: routerStub },
|
||||||
|
CookieService,
|
||||||
CookieService,
|
|
||||||
AuthService,
|
AuthService,
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
@@ -153,7 +152,7 @@ describe('AuthService test', () => {
|
|||||||
(state as any).core = Object.create({});
|
(state as any).core = Object.create({});
|
||||||
(state as any).core.auth = authenticatedState;
|
(state as any).core.auth = authenticatedState;
|
||||||
});
|
});
|
||||||
authService = new AuthService( {}, window, undefined, authReqService, router, cookieService, store, rdbService);
|
authService = new AuthService(undefined, {}, window, undefined, authReqService, router, cookieService, store, rdbService);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should return true when user is logged in', () => {
|
it('should return true when user is logged in', () => {
|
||||||
@@ -214,7 +213,7 @@ describe('AuthService test', () => {
|
|||||||
(state as any).core = Object.create({});
|
(state as any).core = Object.create({});
|
||||||
(state as any).core.auth = authenticatedState;
|
(state as any).core.auth = authenticatedState;
|
||||||
});
|
});
|
||||||
authService = new AuthService({}, window, undefined, authReqService, router, cookieService, store, rdbService);
|
authService = new AuthService(undefined, {}, window, undefined, authReqService, router, cookieService, store, rdbService);
|
||||||
storage = (authService as any).storage;
|
storage = (authService as any).storage;
|
||||||
spyOn(storage, 'get');
|
spyOn(storage, 'get');
|
||||||
spyOn(storage, 'remove');
|
spyOn(storage, 'remove');
|
||||||
|
@@ -43,7 +43,7 @@ export class AuthService {
|
|||||||
protected _authenticated: boolean;
|
protected _authenticated: boolean;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
// @Inject(GLOBAL_CONFIG) public config: GlobalConfig,
|
@Inject(GLOBAL_CONFIG) public config: GlobalConfig,
|
||||||
@Inject(REQUEST) protected req: any,
|
@Inject(REQUEST) protected req: any,
|
||||||
@Inject(NativeWindowService) protected _window: NativeWindowRef,
|
@Inject(NativeWindowService) protected _window: NativeWindowRef,
|
||||||
protected authRequestService: AuthRequestService,
|
protected authRequestService: AuthRequestService,
|
||||||
@@ -216,7 +216,7 @@ export class AuthService {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* private parseSSOLocation(url: string): string {
|
private parseSSOLocation(url: string): string {
|
||||||
console.log('auth.service parseSSOLocation was called');
|
console.log('auth.service parseSSOLocation was called');
|
||||||
const parseUrl = decodeURIComponent(url);
|
const parseUrl = decodeURIComponent(url);
|
||||||
// const urlTree: UrlTree = this.router.parseUrl(url);
|
// const urlTree: UrlTree = this.router.parseUrl(url);
|
||||||
@@ -229,7 +229,7 @@ export class AuthService {
|
|||||||
// console.log(url);
|
// console.log(url);
|
||||||
const target = `?target=${this.config.auth.target.host}${this.config.auth.target.page}`;
|
const target = `?target=${this.config.auth.target.host}${this.config.auth.target.page}`;
|
||||||
return parseUrl.replace(/\?target=http.+/g, target);
|
return parseUrl.replace(/\?target=http.+/g, target);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new user
|
* Create a new user
|
||||||
|
Reference in New Issue
Block a user