mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Branch change commit
This commit is contained in:
@@ -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.
|
||||
|
@@ -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> {
|
||||
|
@@ -1,7 +1,10 @@
|
||||
<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>
|
||||
|
||||
|
||||
|
@@ -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',
|
||||
@@ -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 {
|
||||
|
Reference in New Issue
Block a user