public override bool TryParse(out ArmorTokenHeader armorTokenHeader) { armorTokenHeader = new ArmorTokenHeader(); var authHeaders = headers.GetValues("Authorization"); if (authHeaders == null) { return(false); } var armorHeader = authHeaders.SingleOrDefault(header => header.StartsWith("ARMOR")); if (armorHeader == null) { return(false); } armorTokenHeader.IsValid = true; armorTokenHeader.ArmorToken = armorHeader.Replace("ARMOR ", string.Empty); return(true); }
public override bool TryParse(out ArmorTokenHeader armorTokenHeader) { armorTokenHeader = new ArmorTokenHeader(); var authHeaders = headers.GetValues("Authorization"); if (authHeaders == null) return false; var armorHeader = authHeaders.SingleOrDefault(header => header.StartsWith("ARMOR")); if (armorHeader == null) return false; armorTokenHeader.IsValid = true; armorTokenHeader.ArmorToken = armorHeader.Replace("ARMOR ", string.Empty); return true; }