public string GenerateAuthorizationParameter()
{
switch (Method)
{
case Methods.Basic:
string unencodedUsernameAndPassword = string.Format("{0}:{1}", Username, Password);
byte[] unencodedBytes = UTF8Encoding.UTF8.GetBytes(unencodedUsernameAndPassword);
string base64UsernameAndPassword = Convert.ToBase64String(unencodedBytes);
return string.Format("Basic {0}", base64UsernameAndPassword);
/*case Methods.Portal:
return string.Empty;
case Methods.Proxy:
return string.Empty;*/
default:
return string.Empty;
}
}