Authentication using the ltoken
Authentication tokens are stored by kwauth and by Klocwork client applications in a special file in the user's home directory. This token, called the ltoken, is used to authenticate users with tools such as kwbuildproject, kwcheck and the Web API. You can find this file as follows:
- Windows Vista and Windows 7:C:\Users\<user_name>\.klocwork\ltoken
- Windows XP:C:\Documents and Settings\<user_name>\.klocwork\ltoken
If there is no ltoken file in your .klocwork directory, run kwauth to generate the file.
Overriding the default ltoken location
You can use a custom ltoken file location by setting the 'KLOCWORK_LTOKEN' environment variable. To populate the ltoken file, set 'KLOCWORK_LTOKEN' and authenticate using kwauth. The generated ltoken is stored in the specified location instead of the default location.
1 > export KLOCWORK_LTOKEN=/space/myltokenfile 2 > kwauth 3 > Login: jsmith 4 > Password:
1 > set KLOCWORK_LTOKEN=C:\space\myltokenfile 2 > kwcheck run 3 ...