In my application when the current logged in user's usernam is changed i want to update the UserDetails principal for the current user. How can I do that? I'm getting the current username by following method :
public UserDetails getSystemUser(){
try {
UserDetails principal = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
return principal;
}catch (ClassCastException e){
return null;
}
}
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)