Class RestRequestMatcher

java.lang.Object
com.erudika.para.server.security.RestRequestMatcher
All Implemented Interfaces:
org.springframework.security.web.util.matcher.RequestMatcher

public final class RestRequestMatcher extends Object implements org.springframework.security.web.util.matcher.RequestMatcher
Rest request matcher - returns true if the request is RESTful. True if the URI starts with /vX.Y.Z (.Y.Z are optional)
Author:
Alex Bogdanovski [[email protected]]
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.security.web.util.matcher.RequestMatcher

    org.springframework.security.web.util.matcher.RequestMatcher.MatchResult
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final RestRequestMatcher
    An instance of this class.
    static final org.springframework.security.web.util.matcher.RequestMatcher
    An instance of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    matches(jakarta.servlet.http.HttpServletRequest request)
    Matches a REST request path.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.security.web.util.matcher.RequestMatcher

    matcher
  • Field Details

    • INSTANCE

      public static final RestRequestMatcher INSTANCE
      An instance of this class. Does not match /v1/_me.
    • INSTANCE_STRICT

      public static final org.springframework.security.web.util.matcher.RequestMatcher INSTANCE_STRICT
      An instance of this class. Matches /v1/_me.
  • Method Details

    • getCustomProtectedPaths

      public static List<ProtectedPath> getCustomProtectedPaths()
    • matches

      public boolean matches(jakarta.servlet.http.HttpServletRequest request)
      Matches a REST request path.
      Specified by:
      matches in interface org.springframework.security.web.util.matcher.RequestMatcher
      Parameters:
      request - a request
      Returns:
      true if path is /v1/...