org.springframework.security.oauth2.client.filter.OAuth2AuthenticationFailureEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-security-oauth2 Show documentation
Show all versions of spring-security-oauth2 Show documentation
Module for providing OAuth2 support to Spring Security
package org.springframework.security.oauth2.client.filter;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.authentication.event.AbstractAuthenticationFailureEvent;
import org.springframework.security.core.AuthenticationException;
/**
*
* @deprecated See the OAuth 2.0 Migration Guide for Spring Security 5.
*
*/
@SuppressWarnings("serial")
@Deprecated
public class OAuth2AuthenticationFailureEvent extends AbstractAuthenticationFailureEvent {
public OAuth2AuthenticationFailureEvent(AuthenticationException exception) {
super(new FailedOAuthClientAuthentication(), exception);
}
}
@SuppressWarnings("serial")
class FailedOAuthClientAuthentication extends AbstractAuthenticationToken {
public FailedOAuthClientAuthentication() {
super(null);
}
@Override
public Object getCredentials() {
return "";
}
@Override
public Object getPrincipal() {
return "UNKNOWN";
}
}