Error 401 in flowable-rest

I’ve configured my flowable engine to work with encoded passwords (flowable.idm.password-encoder=spring_bcrypt) and now all the passwords in my DB are hashed, ok, so far so good…my problem is when I try to access to flowable-rest using my literal password, flowable-rest is returning a 401 error.

Have I missed any configuration in the flowable-rest module?

Thank you in advance!

Are you sure that you are using the correct password?

How did you set the literal password for flowable-rest?

I am setting the user and the password as a parameter, the password is not encoded.

        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
        headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));

        MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>();
        params.add("j_username", serverFlowableUsername);
        params.add("j_password", serverFlowablePassword);
        params.add("_spring_security_remember_me", "true");
        params.add("submit", "Login");

        HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(params, headers);

        ResponseEntity<?> response = flowableApacheRestTemplate.exchange(urlOverHttps, HttpMethod.POST, request, String.class);

        String cookie = "";
        if (response.getHeaders().get("Set-Cookie").size() == 1)
        {
            cookie = response.getHeaders().get("Set-Cookie").get(0);
        }
        return cookie;

Are you using some of the given Flowable UI or REST Applications, or are you creating your own application that has the flowable-rest API?