mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 05:23:06 +00:00
Added storage of redirectUrl in a cookie
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
|||||||
isAuthenticationLoading
|
isAuthenticationLoading
|
||||||
} from '../../../../core/auth/selectors';
|
} from '../../../../core/auth/selectors';
|
||||||
import { AuthService } from '../../../../core/auth/auth.service';
|
import { AuthService } from '../../../../core/auth/auth.service';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-log-in-shibboleth',
|
selector: 'ds-log-in-shibboleth',
|
||||||
@@ -47,7 +48,8 @@ export class LogInShibbolethComponent implements OnInit {
|
|||||||
constructor(@Inject('authMethodModelProvider') public injectedAuthMethodModel: AuthMethodModel,
|
constructor(@Inject('authMethodModelProvider') public injectedAuthMethodModel: AuthMethodModel,
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private store: Store<CoreState>,
|
private store: Store<CoreState>,
|
||||||
private authService: AuthService) {
|
private authService: AuthService,
|
||||||
|
private router: Router) {
|
||||||
this.authMethodModel = injectedAuthMethodModel;
|
this.authMethodModel = injectedAuthMethodModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,8 +62,8 @@ export class LogInShibbolethComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
submit() {
|
submit() {
|
||||||
// this.store.dispatch(new SetRedirectUrlAction('/mytest/url'));
|
const redirectUrl: string = this.router.url;
|
||||||
this.authService.setRedirectUrl('myTest/url');
|
this.authService.setRedirectUrl(redirectUrl);
|
||||||
this.store.dispatch(new StartShibbolethAuthenticationAction(this.authMethodModel));
|
this.store.dispatch(new StartShibbolethAuthenticationAction(this.authMethodModel));
|
||||||
// https://host/Shibboleth.sso/Login?target=https://host/shibboleth
|
// https://host/Shibboleth.sso/Login?target=https://host/shibboleth
|
||||||
window.location.href = this.injectedAuthMethodModel.location;
|
window.location.href = this.injectedAuthMethodModel.location;
|
||||||
|
Reference in New Issue
Block a user