保誠-保戶業務員媒合平台
jack
2024-12-25 db15612798841319bafcb3ed4e77c7c013b9446f
pamapi/src/main/java/com/pollex/pam/web/rest/EServiceResource.java
@@ -52,7 +52,7 @@
    @AuditLoggingInject(type = CONSULTANT_LOGIN)
    @PostMapping("/authenticate/{imgCode}")
    public ResponseEntity<UserJWTController.JWTToken> authorize(
    public void authorize(
          @RequestBody EServiceLoginVM eServiceLoginVM
          , HttpServletResponse response, HttpServletRequest request,
         @PathVariable String imgCode) throws Exception{
@@ -82,12 +82,6 @@
        );
        Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken);
        consultantService.updateLoginTime(eServiceLoginVM.getUsername());
        SecurityContextHolder.getContext().setAuthentication(authenticationToken);
        String jwt = tokenProvider.createToken(authentication, false);
        HttpHeaders httpHeaders = new HttpHeaders();
        httpHeaders.add(JWTFilter.AUTHORIZATION_HEADER, "Bearer" + jwt);
        return new ResponseEntity<>(new UserJWTController.JWTToken(jwt), httpHeaders, HttpStatus.OK);
        session.setAttribute("authentication", authentication);
    }
}