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

View File

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

View File

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