Minor improvements
This commit is contained in:
parent
11d4ef74e8
commit
3d2270e11e
@ -293,22 +293,20 @@ export class AuthService {
|
|||||||
}
|
}
|
||||||
return this.procceedJwtTokenValidate();
|
return this.procceedJwtTokenValidate();
|
||||||
} else if (username && password) {
|
} else if (username && password) {
|
||||||
|
this.utils.updateQueryParam('username', null);
|
||||||
|
this.utils.updateQueryParam('password', null);
|
||||||
const loginRequest: LoginRequest = {
|
const loginRequest: LoginRequest = {
|
||||||
username: username,
|
username,
|
||||||
password: password
|
password
|
||||||
};
|
};
|
||||||
return this.http.post<LoginResponse>('/api/auth/login', loginRequest, defaultHttpOptions()).pipe(
|
return this.http.post<LoginResponse>('/api/auth/login', loginRequest, defaultHttpOptions()).pipe(
|
||||||
tap((loginResponse: LoginResponse) => {
|
mergeMap((loginResponse: LoginResponse) => {
|
||||||
try {
|
this.updateAndValidateToken(loginResponse.token, 'jwt_token', false);
|
||||||
this.updateAndValidateToken(loginResponse.token, 'jwt_token', false);
|
this.updateAndValidateToken(loginResponse.refreshToken, 'refresh_token', false);
|
||||||
this.updateAndValidateToken(loginResponse.refreshToken, 'refresh_token', false);
|
|
||||||
} catch (e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
), mergeMap( () => {
|
|
||||||
return this.procceedJwtTokenValidate();
|
return this.procceedJwtTokenValidate();
|
||||||
}
|
}
|
||||||
));
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return this.procceedJwtTokenValidate(doTokenRefresh);
|
return this.procceedJwtTokenValidate(doTokenRefresh);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user