This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static bool TryParseBasicAuthentication(string header, out string username, out string password) | |
{ | |
username = null; password = null; | |
try | |
{ | |
if (!header.StartsWith("Basic ")) | |
return false; | |
// Remove the scheme and optional space after colon if present. |