Is there any listener for the OAuth2 resource server's successful authentication?
I need, to create/replicate the user details in the spring boot resource server on successful authentication, or during token validation.
Any suggestions, on how to implement it in spring boot?
@Component
AuthenticationSuccessEvent
event listener works....
@Component
public class AuthenticationEvent {
Logger logger = LoggerFactory.getLogger(AuthenticationEvent.class);
@EventListener
public void onSuccess(AuthenticationSuccessEvent success) {
System.out.println("S "+ success);
}
}
Refer : https://docs.spring.io/spring-security/reference/servlet/authentication/events.html#servlet-events
&