I tried using with the attributes ‘username’ and ‘password’ and passed the values for ‘password’ and ‘username’ as application variables. The two application variables ‘APPLICATION.myUsername’ and ‘APPLICATION.myPassword’ are initialized with the appropriate values in the ‘onApplicationStart()’ function.
Unfortunately I get the following error message:
Invalid Identifier, the following character cannot be part of an identifier [#]
Neither the username nor the password contain the character ‘#’. I therefore suspect that the ‘#’ characters delimiting the application variables are causing the error. I can’t imagine that this behavior in the tag is intentional?!
I suggested skipping quotes based on recalling this:
It’s not quite the same use-case and certainly feels like a bug based on the info provided. Maybe someone else can confirm. For reference @Knut what’s your version / environment?
Oh man, shame on my head - I have to apologize to you guys.
When the error occurred, in my test scenario I had a small error in the password stored in the application variable and it did not match the .htpasswd.
Then, when I ran the test without surrounding #…# (as @Phillyun suggested), I also fixed the password error and it worked.
After that I didn’t do another test with surrounding #…#. Otherwise, I would have noticed that everything works flawlessly. That’s why @Zackster couldn’t reproduce an error.