Testing local storage of redirectURL

This commit is contained in:
Julius Gruber
2019-10-18 09:50:37 +02:00
parent 8d939cd35c
commit 8ea2b79edf

View File

@@ -16,6 +16,7 @@ import {
isAuthenticated,
isAuthenticationLoading
} from '../../../../core/auth/selectors';
import { AuthService } from '../../../../core/auth/auth.service';
@Component({
selector: 'ds-log-in-shibboleth',
@@ -45,7 +46,8 @@ export class LogInShibbolethComponent implements OnInit {
*/
constructor(@Inject('authMethodModelProvider') public injectedAuthMethodModel: AuthMethodModel,
private formBuilder: FormBuilder,
private store: Store<CoreState>) {
private store: Store<CoreState>,
private authService: AuthService) {
this.authMethodModel = injectedAuthMethodModel;
}
@@ -58,7 +60,8 @@ export class LogInShibbolethComponent implements OnInit {
}
submit() {
this.store.dispatch(new SetRedirectUrlAction('/mytest/url'));
// this.store.dispatch(new SetRedirectUrlAction('/mytest/url'));
this.authService.setRedirectUrl('myTest/url');
this.store.dispatch(new StartShibbolethAuthenticationAction(this.authMethodModel));
// https://host/Shibboleth.sso/Login?target=https://host/shibboleth
window.location.href = this.injectedAuthMethodModel.location;