Codota Logo
CsrfPreventionRequestCycleListener.setConflictingOriginAction
Code IndexAdd Codota to your IDE (free)

How to use
setConflictingOriginAction
method
in
org.apache.wicket.protocol.http.CsrfPreventionRequestCycleListener

Best Java code snippets using org.apache.wicket.protocol.http.CsrfPreventionRequestCycleListener.setConflictingOriginAction (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: com.giffing.wicket.spring.boot.starter/wicket-spring-boot-starter

@Override
public void init(WebApplication webApplication) {
  CsrfPreventionRequestCycleListener listener = new CsrfPreventionRequestCycleListener();
  listener.setConflictingOriginAction(props.getConflictingOriginAction());
  listener.setErrorCode(props.getErrorCode());
  listener.setErrorMessage(props.getErrorMessage());
  listener.setNoOriginAction(props.getNoOriginAction());
  for (String acceptedOrigin : props.getAcceptedOrigins()) {
    listener.addAcceptedOrigin(acceptedOrigin);
  }
  webApplication.getRequestCycleListeners().add(listener);
  
  wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass())
      .withDetail("properties", props)
      .build());
}
origin: MarcGiffing/wicket-spring-boot

@Override
public void init(WebApplication webApplication) {
  CsrfPreventionRequestCycleListener listener = new CsrfPreventionRequestCycleListener();
  listener.setConflictingOriginAction(props.getConflictingOriginAction());
  listener.setErrorCode(props.getErrorCode());
  listener.setErrorMessage(props.getErrorMessage());
  listener.setNoOriginAction(props.getNoOriginAction());
  for (String acceptedOrigin : props.getAcceptedOrigins()) {
    listener.addAcceptedOrigin(acceptedOrigin);
  }
  webApplication.getRequestCycleListeners().add(listener);
  
  wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass())
      .withDetail("properties", props)
      .build());
}
org.apache.wicket.protocol.httpCsrfPreventionRequestCycleListenersetConflictingOriginAction

Javadoc

Sets the action when a conflicting Origin header is detected. Default is ERROR.

Popular methods of CsrfPreventionRequestCycleListener

  • <init>
  • isChecked
    Override to limit whether the request to the specific page should be checked for a possible CSRF att
  • abortHandler
    Handles the case where an Origin HTTP header was not present or did not match the request origin, an
  • addAcceptedOrigin
    Adds an origin (host name/domain name) to the white list. An origin is in the form of .<
  • allowHandler
    Handles the case where an Origin HTTP header was not present or did not match the request origin, an
  • checkRequest
    Performs the check of the Origin or Referer header that is targeted at the page.
  • getSourceUri
    Resolves the source URI from the request headers ( Origin or Referer).
  • getTargetUriFromRequest
    Creates a RFC-6454 comparable URI from the request requested resource.
  • isEnabled
    Dynamic override for enabling/disabling the CSRF detection. Might be handy for specific tenants in a
  • isLocalOrigin
    Checks whether the Origin HTTP header of the request matches where the request came from.
  • isWhitelistedHost
    Checks whether the domain part of the sourceUri ( Origin or Refererheader) is whitelisted.
  • matchingOrigin
    Handles the case where an origin was checked and matched the request origin. Default action is to al
  • isWhitelistedHost,
  • matchingOrigin,
  • normalizeUri,
  • onAborted,
  • onAllowed,
  • onMatchingOrigin,
  • onSuppressed,
  • onWhitelisted,
  • setErrorCode

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JLabel (javax.swing)
  • Join (org.hibernate.mapping)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now