Commit 3d2270e11ec8a9ea436361b0513f4aff439f5d12

Authored by Igor Kulikov
1 parent 11d4ef74

Minor improvements

@@ -293,22 +293,20 @@ export class AuthService { @@ -293,22 +293,20 @@ export class AuthService {
293 } 293 }
294 return this.procceedJwtTokenValidate(); 294 return this.procceedJwtTokenValidate();
295 } else if (username && password) { 295 } else if (username && password) {
  296 + this.utils.updateQueryParam('username', null);
  297 + this.utils.updateQueryParam('password', null);
296 const loginRequest: LoginRequest = { 298 const loginRequest: LoginRequest = {
297 - username: username,  
298 - password: password 299 + username,
  300 + password
299 }; 301 };
300 return this.http.post<LoginResponse>('/api/auth/login', loginRequest, defaultHttpOptions()).pipe( 302 return this.http.post<LoginResponse>('/api/auth/login', loginRequest, defaultHttpOptions()).pipe(
301 - tap((loginResponse: LoginResponse) => {  
302 - try {  
303 - this.updateAndValidateToken(loginResponse.token, 'jwt_token', false);  
304 - this.updateAndValidateToken(loginResponse.refreshToken, 'refresh_token', false);  
305 - } catch (e) {  
306 - }  
307 - }  
308 - ), mergeMap( () => { 303 + mergeMap((loginResponse: LoginResponse) => {
  304 + this.updateAndValidateToken(loginResponse.token, 'jwt_token', false);
  305 + this.updateAndValidateToken(loginResponse.refreshToken, 'refresh_token', false);
309 return this.procceedJwtTokenValidate(); 306 return this.procceedJwtTokenValidate();
310 } 307 }
311 - )); 308 + )
  309 + );
312 } 310 }
313 return this.procceedJwtTokenValidate(doTokenRefresh); 311 return this.procceedJwtTokenValidate(doTokenRefresh);
314 } else { 312 } else {