mirror of
				https://github.com/spring-projects/spring-security.git
				synced 2025-10-30 22:28:46 +00:00 
			
		
		
		
	Add new AuthenticationFailure* events.
This commit is contained in:
		
							parent
							
								
									607ba82522
								
							
						
					
					
						commit
						9176aa0efb
					
				| @ -63,6 +63,28 @@ public class LoggerListener implements ApplicationListener { | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         if (event instanceof AuthenticationFailureCredentialsExpiredEvent) { | ||||
|             AuthenticationFailureCredentialsExpiredEvent authEvent = (AuthenticationFailureCredentialsExpiredEvent) event; | ||||
| 
 | ||||
|             if (logger.isWarnEnabled()) { | ||||
|                 logger.warn( | ||||
|                     "Authentication failed due to account credentials have been expired for user: " | ||||
|                     + authEvent.getUser().getUsername() + "; details: " | ||||
|                     + authEvent.getAuthentication().getDetails()); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         if (event instanceof AuthenticationFailureAccountExpiredEvent) { | ||||
|             AuthenticationFailureAccountExpiredEvent authEvent = (AuthenticationFailureAccountExpiredEvent) event; | ||||
| 
 | ||||
|             if (logger.isWarnEnabled()) { | ||||
|                 logger.warn( | ||||
|                     "Authentication failed due to account having expired for user: " | ||||
|                     + authEvent.getUser().getUsername() + "; details: " | ||||
|                     + authEvent.getAuthentication().getDetails()); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         if (event instanceof AuthenticationFailureUsernameNotFoundEvent) { | ||||
|             AuthenticationFailureUsernameNotFoundEvent authEvent = (AuthenticationFailureUsernameNotFoundEvent) event; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user