Managing server logins
Server Login addresses the requirement for an application to obtain access to Entrust credentials without manual authentication. Server Login is designed for computers, usually servers, which run Entrust applications as services or as background applications. These computers, running 24 hours a day, seven days a week, do not have a user continuously present and are often in a physically secure area with restricted access. Using server login, Entrust-ready services, or background processes can start without operator intervention.
See Server login samples for a complete example.
Installing the server login library
Depending on the operating system of your computer, you would need one of the following login libraries distributed in the etjava_90_lib.zip file.
|
OS |
Library path in etjava_90_lib.zip |
Library configuration |
|
Windows |
etjava/lib/win/x64/UALJNI_64.dll |
Move this file to the %windir%\system32 folder on your computer. |
|
Linux |
etjava/lib/linux/X86_64/libualjni_64.so |
Move this file to the LD_LIBRARY_PATH of your computer. |
Reading credentials
Create a credential reader – for example, to read an Entrust profile.
com.entrust.toolkit.credentials.CredentialReader credReader = new FilenameProfileReader(<epf_file_path>);Instantiate the credential reader.
com.entrust.toolkit.credentials.UALCredentialReader reader = new UALCredentialReader(credReader, new FileInputStream(<ual_file_path>));Creating a user
Create a user object.
com.entrust.toolkit.User user = new User();Logging the user
This use case requires no password; login the user with the null password.
user.login(reader, null);