Class SilverpeasUserSessionTokenResource

    • Constructor Detail

      • SilverpeasUserSessionTokenResource

        public SilverpeasUserSessionTokenResource()
    • Method Detail

      • validateUserAuthentication

        public void validateUserAuthentication​(UserPrivilegeValidation validation)
        Description copied from interface: WebAuthenticationValidation
        Validates the authentication of the user requesting currently a web endpoint by using the specified user privilege validation service. If no session was opened for the user, then open a new one.

        This method should be invoked for web services requiring an authenticated user. Otherwise, the annotation Authenticated can be also used instead at class level.

        Parameters:
        validation - the validation instance to use.
        See Also:
        UserPrivilegeValidator
      • getToken

        @GET
        public javax.ws.rs.core.Response getToken()
        Gets a SilverpeasWebTokenService.WebToken value linked to the current user session.
        Returns:
        a JSON object containing the token into 'token' attribute.
      • getComponentId

        public String getComponentId()
        Description copied from interface: SilverpeasWebResource
        Gets the identifier of the component instance to which the requested resource belongs to.
        Returns:
        the identifier of the Silverpeas component instance.