Class WebEndpointAvailabilityMatcher

  • All Implemented Interfaces:
    org.pac4j.core.matching.matcher.Matcher

    public class WebEndpointAvailabilityMatcher
    extends Object
    implements org.pac4j.core.matching.matcher.Matcher
    Custom pac4j matcher for checking if the web endpoint of the current request is available. If no enpdoint is found or if the endpoint is unavailable a 404 will be returned. DO NOT use this matcher by itself with custom web context (request, response), because the web endpoint and context information that is to be checked is injected via CDI. Therefore the given request is not analyzed / used. CDI is used instead of the given web context (request, response) for performance reasons.
    Since:
    8.0.0
    Author:
    XIMA Media GmbH
    • Field Detail

      • INSTANCE

        public static final org.pac4j.core.matching.matcher.Matcher INSTANCE
    • Method Detail

      • matches

        public boolean matches​(org.pac4j.core.context.WebContext context,
                               org.pac4j.core.context.session.SessionStore sessionStore)
        Checks if the web endpoint of the current request is available. ATTEENTION! Uses CDI to check the web endpoint and NOT the given web context (is the same if used in normal pac4j security flow)!
        Specified by:
        matches in interface org.pac4j.core.matching.matcher.Matcher
        Returns:
        true if the web endpoint of the current request is available and false otherwise.