Digital Media Suite API Forums

« Back to Digital Signs API Forum

Sending Username and Password to HTML site?

Combination View Flat View Tree View
Threads [ Previous | Next ]
Can anyone give me a suggestion on how I can send a Username and Password to a secure HTML site over the DMP 4400?  Scenario - we want to utilize some of our DMP 4400s in our clinic waiting rooms to show a patient tracking website.  The problem is that the website requires a user to login.  Obviously, if a keyboard could be attached to the DMP that would make it easier.  Unfortunately I have not had any luck using a keyboard and can't figure out a method to send the required info.  I'm thinking flash or java but don't know where to start.  We want to use the DMP 4400 over a PC or Wyse terminal for the added functions such as emergency messaging and scheduled playlists.
 
Thanks,
David

Hi,

Did you happen to figure it out?

With regards,
Amit

Unfortunately, we have had no luck and I have been so busy with other projects that I pushed it aside. If I ever do get the answer I will share with the group.

Can anyone give me a suggestion on how I can send a Username and Password to a secure HTML site over the DMP 4400?  Scenario - we want to utilize some of our DMP 4400s in our clinic waiting rooms to show a patient tracking website.  The problem is that the website requires a user to login.  Obviously, if a keyboard could be attached to the DMP that would make it easier.  Unfortunately I have not had any luck using a keyboard and can't figure out a method to send the required info.  I'm thinking flash or java but don't know where to start.  We want to use the DMP 4400 over a PC or Wyse terminal for the added functions such as emergency messaging and scheduled playlists.
 
Thanks,
David

Hi David,
 
We've had similar requirements in the past and we used programmatic methods to send user credentials to the website.
 
If the website accepts Form POST data, then using HTML+JavaScript you can send the user credentials as Form data.


Example (Javascript using HTTP POST)
 
var http = new XMLHttpRequest();
var url = "http://www.securewebsite.com/getsomedata.xml";
var params = "username=john&password=123";
http.open("POST", url, true);
 
//Set headers
http.setRequestHeader("Content-Type", "x-www-form-urlencoded");
http.setRequestHeader("Content-Length", params.length);
http.setRequestHeader("Connection", "close");
 
//Send the post data
http.send(params);

 
If the website accepts Basic Authorization headers, also using HTML+JavaScript you can encode (using Base64) the user credentials and append the values into the request headers.


Example (JavaScript) using Basic Authroization header in HTTP POST.
 
var http = new XMLHttpRequest();
var url = "http://www.securewebsite.com/getsomedata.xml";
var credentials = "am9objoxMjM="; //Base64 Encoded string of 'username:password'.
 
//Set headers
http.setRequestHeader("Authorization", "Basic " + credentials);
 
//Call the secure resource
http.open("GET", url);
 
 
The best way to figure out what the website is using is to use a tool such as "Fiddler2 " to anlayze the request header and responses being sent to the server when you run that website on your normal PC browser. Then replicate that using JavaScript or ActionScript to run on the DMP.