I'm using Waffle in a Spring application to take advantage of Windows authentication. When I run the application from Gradle, everything works great. I get a result such as domain\user. When I compile down to a war and deploy to a standalone tomcat server, I get the result domain\pc name.
I'm really only using the line
String username = WindowsAccountImpl.getCurrentUsername();
Any ideas as to why this is giving different results?
EDIT: I had just posted the question with a SO syntax error. Apologies. Also, I should mention that both of these Tomcat instances are on the same machine. (Windows 7, Tomcat 8, Java 8)
Thanks, Mark. It certainly is and as soon as I read your comment I realized it's running as a local user. No permissions on the domain. Major palm-to-forehead moment.
Updated to run as user with appropriate permissions on the domain and it fixed everything right up.
Thanks again!