Products | Versions |
---|---|
TIBCO ActiveMatrix BusinessWorks | - |
Not Applicable | - |
BW basic authentication requires client to provide username and password in “identity” activity. However, customer needs to change the password without restarting BW. The “identity” activity does not support this and we have to manually implement it in BW.
function make_base_auth(user, password) {
var tok = user + ':' + pass;
var hash = Base64.encode(tok);
return "Basic " + hash;
}
In BW, create the value like this:
concat('Basic ', tib:string-to-base64(concat($username, ':', $password)))
You need to store the user name and password in a file or DB. Use BW to read the user name and password dynamically from the file or DB. See the attached sample project (Filename: basic_authentication_468916.zip).