I’m developing a JSF2 site where the users may start a java application through java web start. The app parses mp3 metadata and sends back a xml file with the parsed information.
I need some way of identifying the user for each file that is sent to the server and I have not been able to figure out how to do this.
In other words the goal is to be able to set the userId in the xml file before the user sends it to the server. In order to do that, I need to somehow have that Id available in the java web start application.
My question is: how do i get the id? Given that the ultimate goal is to parse user mp3 files and get metadata back to the server; any idea of how to do that in a better way is very welcome. Maybe my described way of doing it isn’t the best.
We want to somehow transfer the login identity from the web browser to another application (like your JNLP program)
This is a bit of an unconventional hack, but I think it should work:
I think this should work as long as you don’t have two different users trying to log in at around the same time from the same IP address. If two people on the same network are using this service, they may be using computers with private IPs that share the same public IP. We would need to store something else about the local computer to differentiate the two users. Java can easily read the computer name, for instance. If you can get your browser to also read something like that, then this could go in the table along with the IP address to solve the duplicate IP problem. Some ideas are mentioned in this stack overflow question