Branch change commit

This commit is contained in:
Julius Gruber
2019-09-05 08:00:54 +02:00
parent 6167012e32
commit 917783e34b
4 changed files with 11 additions and 6 deletions

View File

@@ -62,6 +62,7 @@ export class AuthEffects {
* Authenticate user. * Authenticate user.
* @method authenticate * @method authenticate
*/ */
/*
@Effect() @Effect()
public shibbolethAuthenticate$: Observable<Action> = this.actions$.pipe( public shibbolethAuthenticate$: Observable<Action> = this.actions$.pipe(
ofType(AuthActionTypes.START_SHIBBOLETH_AUTHENTICATION), ofType(AuthActionTypes.START_SHIBBOLETH_AUTHENTICATION),
@@ -73,6 +74,7 @@ export class AuthEffects {
); );
}) })
); );
*/
/** /**
* Shib Login. * Shib Login.

View File

@@ -118,14 +118,14 @@ export class AuthService {
shibbolethAuthenticate(location: string) { shibbolethAuthenticate(location: string) {
// implement a call to the backend here // implement a call to the backend here
console.log('location: ', location); console.log('location: ', location);
return this.authRequestService.postToEndpoint('login').pipe( /*return this.authRequestService.postToEndpoint('login').pipe(
map((status: AuthStatus) => { map((status: AuthStatus) => {
if (status.authenticated) { if (status.authenticated) {
return status; return status;
} else { } else {
throw(new Error('Shibboleth login failed')); throw(new Error('Shibboleth login failed'));
} }
})) }))*/
} }
public startShibbAuth(): Observable<AuthStatus> { public startShibbAuth(): Observable<AuthStatus> {

View File

@@ -1,7 +1,10 @@
<form *ngIf="!(loading | async) && !(isAuthenticated | async)" class="form-login px-4 py-3" (ngSubmit)="submit()" <form *ngIf="!(loading | async) && !(isAuthenticated | async)" class="form-login px-4 py-3" (ngSubmit)="submit()"
[formGroup]="shibbForm" novalidate> [formGroup]="shibbForm" novalidate>
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit" <button class="btn btn-lg btn-primary btn-block mt-3" type="submit"
[disabled]="!shibbForm.valid">{{"login.shibbForm.submit" | translate}}</button> [disabled]="!shibbForm.valid"
>{{"login.shibbForm.submit" | translate}}</button>
</form> </form>

View File

@@ -8,6 +8,7 @@ import { CoreState } from '../../../../core/core.reducers';
import { StartShibbolethAuthenticationAction } from '../../../../core/auth/auth.actions'; import { StartShibbolethAuthenticationAction } from '../../../../core/auth/auth.actions';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { isAuthenticated, isAuthenticationLoading } from '../../../../core/auth/selectors'; import { isAuthenticated, isAuthenticationLoading } from '../../../../core/auth/selectors';
import { HttpClient } from '@angular/common/http';
@Component({ @Component({
selector: 'ds-dynamic-shibboleth', selector: 'ds-dynamic-shibboleth',
@@ -45,7 +46,6 @@ export class DynamicShibbolethComponent implements OnInit {
private formBuilder: FormBuilder, private formBuilder: FormBuilder,
private store: Store<CoreState>) { private store: Store<CoreState>) {
this.authMethodModel = injectedAuthMethodModel; this.authMethodModel = injectedAuthMethodModel;
// this.buttonHref = ('https://fis.tiss.tuwien.ac.at' + this.authMethodModel.location + '/shibboleth')
} }
ngOnInit(): void { ngOnInit(): void {