Single sign-on (SSO) / Remote authentication

Submitted 3/10/2011 by Level 2 Support

eStreamDesk now supports any third party user authentication. You can easily integrate your existing user base with your helpdesk and ticketing service.

Within your script or software you can redirect pre-approved users to eStreamDesk by signing the request with your API key. The remote authorization url looks like this:

https://yourcompany.estreamdesk.com/api/auth?email=user@email.com&timestamp=20110310120000&hash=a94a8fe5cc

Let's break this url to parts:

https://yourcompany.estreamdesk.com/ - this is your helpdesk url

api/auth - this is the remote authorization path

?email= - the e-mail parameter specifies the pre-approved users that will be logged in

&timestamp= - the timestamp parameter is the current date and time in the following format "yyMMddhhmmss"; for example March 10th, 2011 08:10:00pm would be "110310201000"

&hash= - the e-mail, timestamp and your api key concatenated in this order and then hashed with SHA1

 

Here's a sample code for ASP.NET in C#:

string apiKey = "myAPIkey-goes-here";
string email = "someuser@somedomain.com";
string timestamp = DateTime.Now.ToString("yyMMddhhmmss");
SHA1Managed sha1 = new SHA1Managed();
byte[] paramBytes = Encoding.UTF8.GetBytes(email + timestamp + apiKey);
byte[] hashBytes = sha1.ComputeHash(paramBytes);
string hash = BitConverter.ToString(hashBytes).Replace("-", "").ToLower();

Response.Redirect(
  string.Format("https://yourcompany.estreamdesk.com/api/auth?email={0}&timestamp={1}&hash={2}", 
  email, timestamp, hash));