From a504d968977f307ad3cf3102c0ed5af32112aab6 Mon Sep 17 00:00:00 2001 From: Julius Gruber Date: Mon, 24 Jun 2019 12:58:40 +0200 Subject: [PATCH] post to login endpoint without credentials --- src/app/core/auth/auth.interceptor.ts | 2 +- src/app/core/auth/auth.service.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/core/auth/auth.interceptor.ts b/src/app/core/auth/auth.interceptor.ts index 6ddac4bd36..177f09f0bc 100644 --- a/src/app/core/auth/auth.interceptor.ts +++ b/src/app/core/auth/auth.interceptor.ts @@ -101,7 +101,7 @@ export class AuthInterceptor implements HttpInterceptor { const token = authService.getToken(); let newReq; - console.log('intercept() request: ', req); + // console.log('intercept() request: ', req); if (authService.isTokenExpired()) { authService.setRedirectUrl(this.router.url); diff --git a/src/app/core/auth/auth.service.ts b/src/app/core/auth/auth.service.ts index bd02e251c9..67fa408b98 100644 --- a/src/app/core/auth/auth.service.ts +++ b/src/app/core/auth/auth.service.ts @@ -117,14 +117,14 @@ export class AuthService { public startShibbAuth(): Observable { console.log('startShibAuth() was called'); // Attempt authenticating the user using the supplied credentials. - const user = 'test@test.at'; + /* const user = 'test@test.at'; const password = 'rest' const body = (`password=${Base64EncodeUrl(password)}&user=${Base64EncodeUrl(user)}`); - const options: HttpOptions = Object.create({}); + const options: HttpOptions = Object.create({});*/ let headers = new HttpHeaders(); headers = headers.append('Content-Type', 'application/x-www-form-urlencoded'); - options.headers = headers; - return this.authRequestService.postToEndpoint('login', body, options).pipe( + // options.headers = headers; + return this.authRequestService.postToEndpoint('login').pipe( map((status: AuthStatus) => { if (status.authenticated) { return status;