The Client's Side

Use on the client is limited to setting the access data (Credentials) in the job:

Warning

Please note that the credentials—depending on the MOM and its configuration—may be transmitted as plain text.

Example 8.1. Authentication on the Client's Side

Job job = createServerJob();
job.setType("authenticated job");

// Authenticate against jadice server
job.setServerCredentials(new Credentials("myUsername", "myPassword"));


If the authentication cannot be verified by the server, the job is aborted with the following error message (see JobListener#executionFailed):

Table 8.2. Details in the Error Message in Case the Authentication Fails

messageID

JS.SECURITY-BAD_CREDENTIALS

reason

You could not be logged in with the user name 'unknown user'.

cause

org.springframework.security.authentication.BadCredentialsException


If the client does not have the required role to access a node or assign specific properties to it, the job aborts with the following error message:

Table 8.3. Details in the Error Message in Case the User Does not Have the Necessary Rights

messageID

JS.SECURITY-INSUFFICIENT_PRIVILEGES

reason

You do not have the required permission [necessary role(s)] for this action: name of the applying rule

cause

org.springframework.security.access.AccessDeniedException


[jadice server Version 5.8.7.0: Documentation for Developers and Administrators. Published: 2021-04-15]