Interface ScopeMatcher


@ProviderType public interface ScopeMatcher
This interface represents the strategy used to match scope. Some of these strategies may be:
  • STRICT: only scope matching a particular string or strings will match
  • HIERARCHICAL: scope following some naming rules might match more general scope. Hierarchy can be described for instance using dot notation. In such scenario everything can also imply longer scope such as everything.readonly.
ScopeMatcher is used together with com.liferay.oauth2.provider.scope.spi.prefixhandler.PrefixHandler and com.liferay.oauth2.provider.scope.spi.scopemapper.ScopeMapper to tailor the matching strategy to the framework configuration.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ScopeMatcher
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Applies the matcher to a collection of scope.
    boolean
    match(String name)
    Specifies if a given scope matches according to the ScopeMatcher.
  • Field Details

  • Method Details

    • filter

      default Collection<String> filter(Collection<String> names)
      Applies the matcher to a collection of scope. Some implementations might have optimization opportunities.
      Parameters:
      names - the collection of scope to match.
      Returns:
      a collection containing those scope that matched.
    • match

      boolean match(String name)
      Specifies if a given scope matches according to the ScopeMatcher.
      Parameters:
      name -
      Returns:
      true if the input scope is a match for the ScopeMatcher, false otherwise.