View Javadoc
1   package org.springframework.security.oauth2.client.filter;
2   
3   import org.springframework.security.authentication.AbstractAuthenticationToken;
4   import org.springframework.security.authentication.event.AbstractAuthenticationFailureEvent;
5   import org.springframework.security.core.AuthenticationException;
6   
7   @SuppressWarnings("serial")
8   public class OAuth2AuthenticationFailureEvent extends AbstractAuthenticationFailureEvent {
9   
10  	public OAuth2AuthenticationFailureEvent(AuthenticationException exception) {
11  		super(new FailedOAuthClientAuthentication(), exception);
12  	}
13  
14  }
15  
16  @SuppressWarnings("serial")
17  class FailedOAuthClientAuthentication extends AbstractAuthenticationToken {
18  
19  	public FailedOAuthClientAuthentication() {
20  		super(null);
21  	}
22  
23  	@Override
24  	public Object getCredentials() {
25  		return "";
26  	}
27  
28  	@Override
29  	public Object getPrincipal() {
30  		return "UNKNOWN";
31  	}
32  	
33  }