Interface FileRouterRequestUtil

All Known Implementing Classes:
RouteUtil

@NullMarked public interface FileRouterRequestUtil
A container for utility methods related with Hilla file-based router.

For internal use only. May be renamed or removed in a future release.

Since:
24.4
Author:
Vaadin Ltd
  • Method Summary

    Modifier and Type
    Method
    Description
    getAllowedAuthorities(jakarta.servlet.http.HttpServletRequest request)
    Gets the set of authorities that are allowed to access the given request.
    boolean
    isAnonymousRoute(jakarta.servlet.http.HttpServletRequest request)
    Checks if the given request goes to a route that allows anonymous access.
    boolean
    isRouteAllowed(jakarta.servlet.http.HttpServletRequest request)
    Deprecated, for removal: This API element is subject to removal in a future version.
    use isAnonymousRoute(HttpServletRequest) to match requests to anonymous routes
    boolean
    isSecuredRoute(jakarta.servlet.http.HttpServletRequest request)
    Checks if the given request goes to a route that requires authentication.
  • Method Details

    • isRouteAllowed

      @Deprecated(since="25.0", forRemoval=true) boolean isRouteAllowed(jakarta.servlet.http.HttpServletRequest request)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use isAnonymousRoute(HttpServletRequest) to match requests to anonymous routes
      Checks if the request corresponds to a Hilla route and, if so, applies the corresponding access control.
      Parameters:
      request - the HTTP request to check
      Returns:
      true if the request is allowed, false otherwise
    • isAnonymousRoute

      boolean isAnonymousRoute(jakarta.servlet.http.HttpServletRequest request)
      Checks if the given request goes to a route that allows anonymous access.
      Parameters:
      request - the HTTP request to check
      Returns:
      true if the request is targeting a route that allows anonymous access, false otherwise
    • isSecuredRoute

      boolean isSecuredRoute(jakarta.servlet.http.HttpServletRequest request)
      Checks if the given request goes to a route that requires authentication.
      Parameters:
      request - the HTTP request to check
      Returns:
      true if the request is targeting a route that requires authentication, false otherwise
    • getAllowedAuthorities

      Set<String> getAllowedAuthorities(jakarta.servlet.http.HttpServletRequest request)
      Gets the set of authorities that are allowed to access the given request.
      Parameters:
      request - the HTTP request to check
      Returns:
      the set of authorities that are allowed to access the given request, or an empty set if no authority is required