Example usage for org.springframework.security.web AuthenticationEntryPoint getClass

List of usage examples for org.springframework.security.web AuthenticationEntryPoint getClass

Introduction

In this page you can find the example usage for org.springframework.security.web AuthenticationEntryPoint getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:es.osoco.grails.plugins.otp.web.TwoFactorExceptionTranslationFilter.java

@Override
protected void sendStartAuthentication(HttpServletRequest request, HttpServletResponse response,
        FilterChain chain, AuthenticationException reason) throws ServletException, IOException {
    // SEC-112: Clear the SecurityContextHolder's Authentication, as the
    // existing Authentication is no longer considered valid
    SecurityContextHolder.getContext().setAuthentication(null);
    requestCache.saveRequest(request, response);
    AuthenticationEntryPoint entryPoint = entryPointByReason(reason);
    if (logger.isDebugEnabled()) {
        logger.debug("Commence authentication using [" + entryPoint.getClass().getName()
                + " authentication entry point");
    }//from   w  w  w  .  j  a  va 2 s  .c om
    entryPoint.commence(request, response, reason);
}