Class AuthorizationFilters


  • public final class AuthorizationFilters
    extends Object
    This class contains methods for creating FilterChains to protect resources by performing authorization on each incoming request.
    Since:
    1.5.0
    • Method Detail

      • createAuthorizationFilter

        public static FilterChain createAuthorizationFilter​(CollectionResourceProvider target,
                                                            CrestAuthorizationModule... modules)
        Returns a new FilterChain which will perform authorization for each request before allowing access to the provided collection resource provider.
        Parameters:
        target - The collection resource provider.
        modules - The CrestAuthorizationModules that will perform authorization for each request.
        Returns:
        A new FilterChain which will filter requests before allowing access to the provided collection resource provider.
        Throws:
        NullPointerException - If either the specified target or modules parameters are null.
      • createAuthorizationFilter

        public static FilterChain createAuthorizationFilter​(CollectionResourceProvider target,
                                                            List<CrestAuthorizationModule> modules)
        Returns a new FilterChain which will perform authorization for each request before allowing access to the provided collection resource provider.
        Parameters:
        target - The collection resource provider.
        modules - The CrestAuthorizationModules that will perform authorization for each request.
        Returns:
        A new FilterChain which will filter requests before allowing access to the provided collection resource provider.
        Throws:
        NullPointerException - If either the specified target or modules parameters are null.
      • createAuthorizationFilter

        public static FilterChain createAuthorizationFilter​(SingletonResourceProvider target,
                                                            CrestAuthorizationModule... modules)
        Returns a new FilterChain which will perform authorization for each request before allowing access to the provided singleton resource provider.
        Parameters:
        target - The singleton resource provider.
        modules - The CrestAuthorizationModules that will perform authorization for each request.
        Returns:
        A new FilterChain which will filter requests before allowing access to the provided singleton resource provider.
        Throws:
        NullPointerException - If either the specified target or modules parameters are null.
      • createAuthorizationFilter

        public static FilterChain createAuthorizationFilter​(SingletonResourceProvider target,
                                                            List<CrestAuthorizationModule> modules)
        Returns a new FilterChain which will perform authorization for each request before allowing access to the provided singleton resource provider.
        Parameters:
        target - The singleton resource provider.
        modules - The CrestAuthorizationModules that will perform authorization for each request.
        Returns:
        A new FilterChain which will filter requests before allowing access to the provided singleton resource provider.
        Throws:
        NullPointerException - If either the specified target or modules parameters are null.
      • createAuthorizationFilter

        public static FilterChain createAuthorizationFilter​(RequestHandler target,
                                                            CrestAuthorizationModule... modules)
        Returns a new FilterChain which will perform authorization for each request before allowing access to the provided RequestHandler.
        Parameters:
        target - The RequestHandler.
        modules - The CrestAuthorizationModules that will perform authorization for each request.
        Returns:
        A new FilterChain which will filter requests before allowing access to the provided RequestHandler.
        Throws:
        NullPointerException - If either the specified target or modules parameters are null.
      • createAuthorizationFilter

        public static FilterChain createAuthorizationFilter​(RequestHandler target,
                                                            List<CrestAuthorizationModule> modules)
        Returns a new FilterChain which will perform authorization for each request before allowing access to the provided RequestHandler.
        Parameters:
        target - The RequestHandler.
        modules - The CrestAuthorizationModules that will perform authorization for each request.
        Returns:
        A new FilterChain which will filter requests before allowing access to the provided RequestHandler.
        Throws:
        NullPointerException - If either the specified target or modules parameters are null.