Class FaceletsAuthorizeTagUtils

java.lang.Object
org.joinfaces.security.taglib.FaceletsAuthorizeTagUtils

public final class FaceletsAuthorizeTagUtils extends Object
This class provides static methods that are registered as EL functions and available for use in Unified EL expressions in standard Facelets views.
See Also:
  • FaceletsAuthorizeTagUtils
  • Constructor Details

    • FaceletsAuthorizeTagUtils

      protected FaceletsAuthorizeTagUtils()
  • Method Details

    • areAllGranted

      public static boolean areAllGranted(String authorities) throws IOException
      Returns true if the user has all of of the given authorities.
      Parameters:
      authorities - a comma-separated list of user authorities.
      Returns:
      computation if the user has all of of the given authorities
      Throws:
      IOException - io exception
    • areAnyGranted

      public static boolean areAnyGranted(String authorities) throws IOException
      Returns true if the user has any of the given authorities.
      Parameters:
      authorities - a comma-separated list of user authorities.
      Returns:
      computation if the user has any of the given authorities.
      Throws:
      IOException - io exception
    • areNotGranted

      public static boolean areNotGranted(String authorities) throws IOException
      Returns true if the user does not have any of the given authorities.
      Parameters:
      authorities - a comma-separated list of user authorities.
      Returns:
      computation if the user does not have any of the given authorities.
      Throws:
      IOException - io exception
    • isAllowed

      public static boolean isAllowed(String url, String method) throws IOException
      Returns true if the user is allowed to access the given URL and HTTP method combination. The HTTP method is optional and case insensitive.
      Parameters:
      url - to be accessed.
      method - to be called.
      Returns:
      computation if the user is allowed to access the given URL and HTTP method.
      Throws:
      IOException - io exception
    • isAnonymous

      public static boolean isAnonymous() throws IOException
      Returns true if user is anonymous.
      Returns:
      computation if the user is anonymous.
      Throws:
      IOException - io exception
    • isAuthenticated

      public static boolean isAuthenticated() throws IOException
      Returns true if the user is not anonymous.
      Returns:
      computation if the user is not anonymous.
      Throws:
      IOException - io exception
    • isFullyAuthenticated

      public static boolean isFullyAuthenticated() throws IOException
      Returns true if the is not an anonymous or a remember-me user.
      Returns:
      computation if the user is not an anonymous or a remember-me user.
      Throws:
      IOException - io exception