Class PasswordResource

    • Field Detail

      • settings

        protected static org.silverpeas.kernel.bundle.SettingBundle settings
      • nbMatchingCombinedRules

        protected static int nbMatchingCombinedRules
    • Constructor Detail

      • PasswordResource

        public PasswordResource()
    • Method Detail

      • validateUserAuthentication

        public void validateUserAuthentication​(UserPrivilegeValidation validation)
                                        throws javax.ws.rs.WebApplicationException
        User authentication is not necessary for this WEB Service. The authentication processing is used here to identify the user behind the call if possible.
        Parameters:
        validation - the validation instance to use.
        Throws:
        javax.ws.rs.WebApplicationException - if an error occurs
        See Also:
        UserPrivilegeValidator
      • getPolicy

        @GET
        @Path("policy")
        @Produces({"application/json","application/xml"})
        public PasswordPolicyEntity getPolicy()
        Gets the JSON representation of password policy. If it doesn't exist, a 404 HTTP code is returned. If a problem occurs when processing the request, a 503 HTTP code is returned.
        Returns:
        the response to the HTTP GET request with the JSON representation of the asked photo.
      • checking

        @POST
        @Path("policy/checking")
        @Consumes("application/json")
        @Produces("application/json")
        public PasswordCheckEntity checking​(PasswordEntity password)
        Gets the JSON representation of a list of errors catched by a password checking. The returned list contains names of rules which are not verified. If it doesn't exist, a 404 HTTP code is returned. If a problem occurs when processing the request, a 503 HTTP code is returned.
        Returns:
        the response to the HTTP GET request with the JSON representation of the asked photo.