How to manually authenticate user by adding ManualUserDetails extends org.springframework.security.core.userdetails.UserDetails into SecurityContextHolder.setAuthentication(..) ?
How to manually authenticate user by adding ManualUserDetails extends org.springframework.security.core.userdetails.UserDetails into SecurityContextHolder.setAuthentication(..) ?
Share
I hope you have created a custom authentication provider (called myAuthenticationProvider below) as follows:
In the bean myAuthenticationProvider you need to provide a userDetails service, that would load the your ManualUserDetails.