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

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

Best Java code snippets using org.apache.wicket.protocol.http.CsrfPreventionRequestCycleListener.getTargetUriFromRequest (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: org.apache.wicket/wicket-core

/**
 * Checks whether the {@code Origin} HTTP header of the request matches where the request came
 * from.
 *
 * @param containerRequest
 *            the current container request
 * @param originHeader
 *            the contents of the {@code Origin} HTTP header
 * @return {@code true} when the origin of the request matches the {@code Origin} HTTP header
 */
protected boolean isLocalOrigin(HttpServletRequest containerRequest, String originHeader)
{
  // Make comparable strings from Origin and Location
  String origin = normalizeUri(originHeader);
  if (origin == null)
    return false;
  String request = getTargetUriFromRequest(containerRequest);
  if (request == null)
    return false;
  return origin.equalsIgnoreCase(request);
}
origin: apache/wicket

/**
 * Checks whether the {@code Origin} HTTP header of the request matches where the request came
 * from.
 *
 * @param containerRequest
 *            the current container request
 * @param originHeader
 *            the contents of the {@code Origin} HTTP header
 * @return {@code true} when the origin of the request matches the {@code Origin} HTTP header
 */
protected boolean isLocalOrigin(HttpServletRequest containerRequest, String originHeader)
{
  // Make comparable strings from Origin and Location
  String origin = normalizeUri(originHeader);
  if (origin == null)
    return false;
  String request = getTargetUriFromRequest(containerRequest);
  if (request == null)
    return false;
  return origin.equalsIgnoreCase(request);
}
org.apache.wicket.protocol.httpCsrfPreventionRequestCycleListenergetTargetUriFromRequest

Javadoc

Creates a RFC-6454 comparable URI from the request requested resource.

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).
  • 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
  • normalizeUri
    Creates a RFC-6454 comparable URI from the uri string.
  • matchingOrigin,
  • normalizeUri,
  • onAborted,
  • onAllowed,
  • onMatchingOrigin,
  • onSuppressed,
  • onWhitelisted,
  • setConflictingOriginAction,
  • 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