All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.security.oauth2.provider.error.LoggingOAuth2AuthenticationEntryPoint Maven / Gradle / Ivy

package org.springframework.security.oauth2.provider.error;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.security.core.AuthenticationException;

public class LoggingOAuth2AuthenticationEntryPoint extends OAuth2AuthenticationEntryPoint {
  @Override
  public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
    if (logger.isTraceEnabled()) {
      logger.trace(authException, authException);
    }
    else if (logger.isWarnEnabled()) {
      logger.warn(authException);
    }
    super.commence(request, response, authException);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy