Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select user_id from users where md5(concat(username, password)) = 'TOKEN_HERE'
- string authHeader = application.Request.Headers["Authorization"];
- if (authHeader.ToUpper().Contains("BASIC"))
- {
- //get the user's name/password
- string decodedResponseString = Encoding.Default.GetString(Convert.FromBase64String(authHeader.Substring(6)));
- int dividerIndex = decodedResponseString.IndexOf(':');
- userName = decodedResponseString.Substring(0, dividerIndex);
- password = decodedResponseString.Substring(dividerIndex + 1);
Add Comment
Please, Sign In to add comment