Tabnine Logo
AccessDeniedHandlerImpl.handle
Code IndexAdd Tabnine to your IDE (free)

How to use
handle
method
in
org.springframework.security.web.access.AccessDeniedHandlerImpl

Best Java code snippets using org.springframework.security.web.access.AccessDeniedHandlerImpl.handle (Showing top 8 results out of 315)

origin: apache/syncope

  @Override
  public void handle(final HttpServletRequest request, final HttpServletResponse response,
      final AccessDeniedException accessDeniedException) throws IOException, ServletException {

    response.addHeader(RESTHeaders.ERROR_INFO, accessDeniedException.getMessage());

    super.handle(request, response, accessDeniedException);
  }
}
origin: org.apache.syncope.core/syncope-core-spring

@Override
public void handle(final HttpServletRequest request, final HttpServletResponse response,
    final AccessDeniedException accessDeniedException) throws IOException, ServletException {
  response.addHeader(RESTHeaders.ERROR_INFO, accessDeniedException.getMessage());
  super.handle(request, response, accessDeniedException);
}
origin: theotherp/nzbhydra2

@Override
public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException, ServletException {
  logger.warn("Access denied to IP {}: {}", SessionStorage.IP.get(), accessDeniedException.getMessage());
  attemptService.accessFailed(SessionStorage.IP.get());
  super.handle(request, response, accessDeniedException);
}
origin: Erudika/para

@Override
public void handle(HttpServletRequest request, HttpServletResponse response,
  AccessDeniedException accessDeniedException) throws IOException, ServletException {
  if (isRestRequest(request)) {
    RestUtils.returnStatusResponse(response, HttpServletResponse.SC_FORBIDDEN, accessDeniedException.getMessage());
  } else {
    super.handle(request, response, accessDeniedException);
  }
}
origin: com.erudika/para

@Override
public void handle(HttpServletRequest request, HttpServletResponse response,
  AccessDeniedException accessDeniedException) throws IOException, ServletException {
  if (isRestRequest(request)) {
    RestUtils.returnStatusResponse(response, HttpServletResponse.SC_FORBIDDEN, accessDeniedException.getMessage());
  } else {
    super.handle(request, response, accessDeniedException);
  }
}
origin: stackoverflow.com

 public class MyAccessDeniedHandler implements AccessDeniedHandler {

  private AccessDeniedHandlerImpl accessDeniedHandlerImpl = new AccessDeniedHandlerImpl();

  public void handle(HttpServletRequest request, HttpServletResponse response,
      AccessDeniedException accessDeniedException) throws IOException, ServletException {

    //Some CSRF related code 

    // Then call accessDeniedHandlerImpl.handle to handle request
    accessDeniedHandlerImpl.handle(request, response, accessDeniedException);
  }

  /**
   * The error page to use. Must begin with a "/" and is interpreted relative to the current context root.
   *
   * @param errorPage the dispatcher path to display
   *
   * @throws IllegalArgumentException if the argument doesn't comply with the above limitations
   * @see AccessDeniedHandlerImpl#setErrorPage(String)
   */
  public void setErrorPage(String errorPage) {
    // You can set custom error page here 
    accessDeniedHandlerImpl.setErrorPage(errorPage);
  }
}
origin: socialsignin/spring-social-security

request.setAttribute(REQUIRED_PROVIDERS_REQUEST_ATTRIBUTE_NAME, requiredProviderIds);
providerSpecificAccessDeniedHandler.setErrorPage(connectWithProviderUrlPrefix + "/" + requiredProviderIds.iterator().next());
providerSpecificAccessDeniedHandler.handle(request, response, accessDeniedException);
   = new AccessDeniedHandlerImpl();
  defaultAccessDeniedHandler.setErrorPage(defaultAccessDeniedUrl);
  defaultAccessDeniedHandler.handle(request, response, accessDeniedException);
  super.handle(request, response, accessDeniedException);
origin: com.erudika/para-server

@Override
public void handle(HttpServletRequest request, HttpServletResponse response,
  AccessDeniedException accessDeniedException) throws IOException, ServletException {
  if (isRestRequest(request)) {
    RestUtils.returnStatusResponse(response, HttpServletResponse.SC_FORBIDDEN, accessDeniedException.getMessage());
  } else {
    super.handle(request, response, accessDeniedException);
  }
}
org.springframework.security.web.accessAccessDeniedHandlerImplhandle

Popular methods of AccessDeniedHandlerImpl

  • <init>
  • setErrorPage

Popular in Java

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • String (java.lang)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now