Interface CapabilityChecker

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean hasAllCapabilities​(SessionToken sessionToken, String... capabilities)
      Checks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has all of the designated capabilities.
      boolean hasAllTopLevelCapabilities​(SessionToken sessionToken, String... capabilities)
      Checks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has all of the designated capabilities.
      boolean hasOneCapability​(SessionToken sessionToken, String... capabilities)
      Checks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has at least one of the designated capabilities.
      boolean hasOneTopLevelCapability​(SessionToken sessionToken, String... capabilities)
      Checks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has at least one of the designated capabilities.
    • Method Detail

      • hasOneCapability

        boolean hasOneCapability​(SessionToken sessionToken,
                                 String... capabilities)
                          throws SecurityTokenIntegrityException
        Checks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has at least one of the designated capabilities.
        Parameters:
        sessionToken - The session token of which to check the integrity and to return the capability of.
        capabilities - One ore more strings representing the capability/capabilities of the function the owner of this token wants to perform.
        Returns:
        Whether the (security token of the) designated session has at least one of the designated capabilities.
        Throws:
        SecurityTokenIntegrityException - If the designated session token has no integrity, a SecurityTokenIntegrityException will be thrown.
        See Also:
        Capabilities
      • hasOneTopLevelCapability

        boolean hasOneTopLevelCapability​(SessionToken sessionToken,
                                         String... capabilities)
                                  throws SecurityTokenIntegrityException
        Checks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has at least one of the designated capabilities.
        Parameters:
        sessionToken - The session token of which to check the integrity and to return the capability of the corresponding top-level session token.
        capabilities - One or more strings representing the capability/capabilities of the function the owner of the top-level session token wants to perform.
        Returns:
        Whether the (security token of the) top-level parent session of the designated session has at least one of the designated capabilities.
        Throws:
        SecurityTokenIntegrityException - If the top-level parent session of the designated session token has no integrity, a SecurityTokenIntegrityException will be thrown.
        See Also:
        Capabilities
      • hasAllCapabilities

        boolean hasAllCapabilities​(SessionToken sessionToken,
                                   String... capabilities)
                            throws SecurityTokenIntegrityException
        Checks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has all of the designated capabilities.
        Parameters:
        sessionToken - The session token of which to check the integrity and to return the capability of.
        capabilities - One ore more strings representing the capability/capabilities of the function the owner of this token wants to perform.
        Returns:
        Whether the (security token of the) designated session has all of the designated capabilities.
        Throws:
        SecurityTokenIntegrityException - If the designated session token has no integrity, a SecurityTokenIntegrityException will be thrown.
        See Also:
        Capabilities
      • hasAllTopLevelCapabilities

        boolean hasAllTopLevelCapabilities​(SessionToken sessionToken,
                                           String... capabilities)
                                    throws SecurityTokenIntegrityException
        Checks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has all of the designated capabilities.
        Parameters:
        sessionToken - The session token of which to check the integrity and to return the capability of the corresponding top-level session token.
        capabilities - One or more strings representing the capability/capabilities of the function the owner of the top-level session token wants to perform.
        Returns:
        Whether the (security token of the) top-level parent session of the designated session has all of the designated capabilities.
        Throws:
        SecurityTokenIntegrityException - If the top-level parent session of the designated session token has no integrity, a SecurityTokenIntegrityException will be thrown.
        See Also:
        Capabilities