Logo Search packages:      
Sourcecode: tasque version File versions  Download package

string RtmNet::Rtm::AuthCalcWebUrl ( AuthLevel  authLevel  )  [inline]

Calculates the URL to redirect the user to Rtm web site for auehtntication. Used by Web applications. See AuthGetFrob for example code.

The Rtm web site provides 'tiny urls' that can be used in place of this URL when you specify your return url in the API key page. It is recommended that you use these instead as they do not include your API or shared secret.

authLevel The AuthLevel stating the maximum authentication level your application requires.
The url to redirect the user to.

Definition at line 412 of file Rtm.cs.

                  if( sharedSecret == null ) throw new SignatureRequiredException();

                  string hash = sharedSecret + "api_key" + apiKey + "perms" + authLevel.ToString().ToLower();
                  hash = Md5Hash(hash);
                  string url = AuthUrl + "?api_key=" + apiKey + "&perms=" + authLevel.ToString().ToLower();
                  url += "&api_sig=" + hash;

                  return url;

Generated by  Doxygen 1.6.0   Back to index