/// <summary> Add a new mapping between a server variable returned from Shibboleth and a user attribute within the SobekCM user object </summary>
 /// <param name="ServerVariable"> Server variable from the Shibboleth response </param>
 /// <param name="UserAttribute"> Attribute within the SobekCM user object </param>
 public void Add_Attribute_Mapping(string ServerVariable, User_Object_Attribute_Mapping_Enum UserAttribute)
 {
     attributeMapping[ServerVariable] = UserAttribute;
 }
 /// <summary> Add a new constant mapping for all new users that are established using this Shibboleth authentication system </summary>
 /// <param name="UserAttribute"> Attribute within the SobekCM user object </param>
 /// <param name="ConstantValue"> Constant value to apply for all new Shibboleth users established using this Shibboleth authenticaion system </param>
 public void Add_Constant(User_Object_Attribute_Mapping_Enum UserAttribute, string ConstantValue)
 {
     Constants.Add(new KeyValuePair<User_Object_Attribute_Mapping_Enum, string>(UserAttribute, ConstantValue ));
 }
        /// <summary> Gets a value from this user object, based on the user object attribute mapping enumeration </summary>
        /// <param name="Mapping"> Field to get from this user object </param>
        public string Get_Value_By_Mapping(User_Object_Attribute_Mapping_Enum Mapping)
        {
            switch (Mapping)
            {
                case User_Object_Attribute_Mapping_Enum.Username:
                    return UserName;

                case User_Object_Attribute_Mapping_Enum.Email:
                    return Email;

                case User_Object_Attribute_Mapping_Enum.Firstname:
                    return Given_Name;

                case User_Object_Attribute_Mapping_Enum.Lastname:
                    return Family_Name;

                case User_Object_Attribute_Mapping_Enum.Nickname:
                    return Nickname;

                case User_Object_Attribute_Mapping_Enum.Fullname:
                    return Full_Name;

                case User_Object_Attribute_Mapping_Enum.Notes:
                    return Internal_Notes;

                case User_Object_Attribute_Mapping_Enum.Organization:
                    return Organization;

                case User_Object_Attribute_Mapping_Enum.OrgCode:
                    return Organization_Code;

                case User_Object_Attribute_Mapping_Enum.College:
                    return College;

                case User_Object_Attribute_Mapping_Enum.Department:
                    return Department;
            }

            return String.Empty;
        }
 /// <summary> Constructor for a new instance of the Shibboleth_Configuration_Mapping class </summary>
 /// <param name="Mapping"> Indicates a mapping to an attribute under the user class </param>
 /// <param name="Value"> Value, either a constant to put in the user via the mapping, or the
 /// Shibboleth authentication key, used to find a user specific value and map
 /// to the user class </param>
 public Shibboleth_Configuration_Mapping(User_Object_Attribute_Mapping_Enum Mapping, string Value)
 {
     this.Mapping = Mapping;
     this.Value   = Value;
 }
        /// <summary> Set a value on this user object, based on the user object attribute mapping enumeration </summary>
        /// <param name="Mapping"> Field to set in this user object </param>
        /// <param name="Value"> Value to set that field to </param>
        public void Set_Value_By_Mapping(User_Object_Attribute_Mapping_Enum Mapping, string Value)
        {
            switch (Mapping)
            {
                case User_Object_Attribute_Mapping_Enum.Username:
                    UserName = Value;
                    break;

                case User_Object_Attribute_Mapping_Enum.Email:
                    Email = Value;
                    break;

                case User_Object_Attribute_Mapping_Enum.Firstname:
                    Given_Name = Value;
                    break;

                case User_Object_Attribute_Mapping_Enum.Lastname:
                    Family_Name = Value;
                    break;

                case User_Object_Attribute_Mapping_Enum.Nickname:
                    Nickname = Value;
                    break;

                case User_Object_Attribute_Mapping_Enum.Notes:
                    Internal_Notes = Value;
                    break;

                case User_Object_Attribute_Mapping_Enum.Organization:
                    Organization = Value;
                    break;

                case User_Object_Attribute_Mapping_Enum.OrgCode:
                    Organization_Code = Value;
                    break;

                case User_Object_Attribute_Mapping_Enum.College:
                    College = Value;
                    break;

                case User_Object_Attribute_Mapping_Enum.Department:
                    Department = Value;
                    break;
            }
        }
        /// <summary> Convert the enumeration for the user object attribute mapping to a string </summary>
        /// <param name="Value"> Enumeration value </param>
        /// <returns> String value </returns>
        public static string ToString(User_Object_Attribute_Mapping_Enum Value)
        {
            switch (Value)
            {
                case User_Object_Attribute_Mapping_Enum.Username:
                    return "USERNAME";

                case User_Object_Attribute_Mapping_Enum.Email:
                    return "EMAIL";

                case User_Object_Attribute_Mapping_Enum.Firstname:
                    return "FIRSTNAME";

                case User_Object_Attribute_Mapping_Enum.Lastname:
                    return "LASTNAME";

                case User_Object_Attribute_Mapping_Enum.Nickname:
                    return "NICKNAME";

                case User_Object_Attribute_Mapping_Enum.Notes:
                    return "NOTES";

                case User_Object_Attribute_Mapping_Enum.Organization:
                    return "ORGANIZATION";

                case User_Object_Attribute_Mapping_Enum.OrgCode:
                    return "ORGCODE";

                case User_Object_Attribute_Mapping_Enum.College:
                    return "COLLEGE";

                case User_Object_Attribute_Mapping_Enum.Department:
                    return "DEPARTMENT";

                default:
                    return "NONE";
            }
        }
 /// <summary> Constructor for a new instance of the Shibboleth_Configuration_Mapping class </summary>
 /// <param name="Mapping"> Indicates a mapping to an attribute under the user class </param>
 /// <param name="Value"> Value, either a constant to put in the user via the mapping, or the 
 /// Shibboleth authentication key, used to find a user specific value and map
 /// to the user class </param>
 public Shibboleth_Configuration_Mapping(User_Object_Attribute_Mapping_Enum Mapping, string Value)
 {
     this.Mapping = Mapping;
     this.Value = Value;
 }
 /// <summary> Add a new constant mapping for all new users that are established using this Shibboleth authentication system </summary>
 /// <param name="UserAttribute"> Attribute within the SobekCM user object </param>
 /// <param name="ConstantValue"> Constant value to apply for all new Shibboleth users established using this Shibboleth authenticaion system </param>
 public void Add_Constant(User_Object_Attribute_Mapping_Enum UserAttribute, string ConstantValue)
 {
     Constants.Add(new Shibboleth_Configuration_Mapping(UserAttribute, ConstantValue ));
 }
 /// <summary> Add a new mapping between a server variable returned from Shibboleth and a user attribute within the SobekCM user object </summary>
 /// <param name="ServerVariable"> Server variable from the Shibboleth response </param>
 /// <param name="UserAttribute"> Attribute within the SobekCM user object </param>
 public void Add_Attribute_Mapping(string ServerVariable, User_Object_Attribute_Mapping_Enum UserAttribute)
 {
     AttributeMapping.Add(new Shibboleth_Configuration_Mapping(UserAttribute, ServerVariable));
     attributeMappingDictionary[ServerVariable] = UserAttribute;
 }
 /// <summary> Add a new constant mapping for all new users that are established using this Shibboleth authentication system </summary>
 /// <param name="UserAttribute"> Attribute within the SobekCM user object </param>
 /// <param name="ConstantValue"> Constant value to apply for all new Shibboleth users established using this Shibboleth authenticaion system </param>
 public void Add_Constant(User_Object_Attribute_Mapping_Enum UserAttribute, string ConstantValue)
 {
     Constants.Add(new Shibboleth_Configuration_Mapping(UserAttribute, ConstantValue));
 }
 /// <summary> Add a new mapping between a server variable returned from Shibboleth and a user attribute within the SobekCM user object </summary>
 /// <param name="ServerVariable"> Server variable from the Shibboleth response </param>
 /// <param name="UserAttribute"> Attribute within the SobekCM user object </param>
 public void Add_Attribute_Mapping(string ServerVariable, User_Object_Attribute_Mapping_Enum UserAttribute)
 {
     AttributeMapping.Add(new Shibboleth_Configuration_Mapping(UserAttribute, ServerVariable));
     attributeMappingDictionary[ServerVariable] = UserAttribute;
 }