Interface WebAuthorizationValidation

    • Method Detail

      • getSilverpeasContext

        SilverpeasRequestContext getSilverpeasContext()
        Gets the context of Silverpeas linked to the current request. This context must be initialized before the functional request processing.
        Returns:
        SilverpeasRequestContext instance.
      • validateUserAuthorization

        default void validateUserAuthorization​(UserPrivilegeValidation validation)
        Validates the authorization of the user to request the web endpoint referred by the Silverpeas context by using the specified user privilege validation service. By default, it checks only the user has a valid account in Silverpeas. Further or more precise authorization treatments are delegated to implementors.

        This method should be invoked for web services requiring an authorized user to access them. Otherwise, the annotation Authorized can be also used instead at class level.

        Parameters:
        validation - the validation instance to use.
        Throws:
        javax.ws.rs.WebApplicationException - if the authorization isn't valid (no authorized or authorization failure).
        See Also:
        UserPrivilegeValidator