SHARE
TWEET

Untitled

a guest May 22nd, 2018 455 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select user_id from users where md5(concat(username, password)) = 'TOKEN_HERE'
  2.    
  3. string authHeader = application.Request.Headers["Authorization"];
  4.         if (authHeader.ToUpper().Contains("BASIC"))
  5.         {
  6.             //get the user's name/password
  7.             string decodedResponseString = Encoding.Default.GetString(Convert.FromBase64String(authHeader.Substring(6)));
  8.             int dividerIndex = decodedResponseString.IndexOf(':');
  9.             userName = decodedResponseString.Substring(0, dividerIndex);
  10.             password = decodedResponseString.Substring(dividerIndex + 1);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top