Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Can we avoid specifying User ID & password for connecting to LiveCycle server through code?

Avatar

Former Community Member
Hi,



I am developing a JAVA program that connects to the LiveCycle ES server to assemble two PDF files. Here is some part of the code I am using. The code works fine.



Properties connectionProps = new Properties();

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "jnp://localhost:1099");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_EJB_PROTOCOL);

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");



ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);



AssemblerServiceClient assemblerClient = new AssemblerServiceClient(myFactory);



If I do not use the credential info (user ID and password) I get some credential exceptions. Is there a way that I can avoid providing the credential information? The reason for this is I do not want to hardcode the user ID and password information as the password can change. Is there any other way to solve this issue?



Regards,

Ragha
2 Replies

Avatar

Level 10
You can turn security off from your process.



Go under adminui under Services/Application and Services/Service Management.



Search for your process and under the security tab you can disable the security or use the 'Run As' feature to run under a specific user context.



Jasmin