Class HerodotusAnyRequestMatcher

java.lang.Object
cn.herodotus.engine.oauth2.authorization.matcher.HerodotusAnyRequestMatcher
All Implemented Interfaces:
HerodotusRequestMatcher, org.springframework.security.web.util.matcher.RequestMatcher

public class HerodotusAnyRequestMatcher extends Object implements HerodotusRequestMatcher

Description: 自定义任意请求匹配器

拷贝自 AnyRequestMatcher。进行一定的修改以支持纯在没有 HttpServletRequest 的环境下进行路径的比较和匹配

概扩展的目的,主要是为了实现 SecurityAttributeStorage 代码中,使用 PathPatternRequestMatcher 逻辑进行高效请求路径去重分析。

Author:
: gengwei.zheng
Date:
: 2025/8/24 0:21
  • 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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    boolean
    判断策略所实施的规则是否与提供的请求相匹配
    boolean
    matches(jakarta.servlet.http.HttpServletRequest request)
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface cn.herodotus.engine.oauth2.authorization.matcher.HerodotusRequestMatcher

    matcher

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

    matcher
  • Field Details

  • Method Details

    • matches

      public boolean matches(jakarta.servlet.http.HttpServletRequest request)
      Specified by:
      matches in interface org.springframework.security.web.util.matcher.RequestMatcher
    • matches

      public boolean matches(HerodotusRequest request)
      Description copied from interface: HerodotusRequestMatcher
      判断策略所实施的规则是否与提供的请求相匹配
      Specified by:
      matches in interface HerodotusRequestMatcher
      Parameters:
      request - 自定义请求对象 HerodotusRequest
      Returns:
      true 请求是否匹配,false 不匹配
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object