/// <summary> /// Serializes the auth levels to a list of aliases. /// </summary> /// <param name="preferredAuthLevelTypes">The preferred auth level types.</param> /// <param name="aliases">The alias manager.</param> /// <returns>A space-delimited list of aliases.</returns> private static string SerializeAuthLevels(IList <string> preferredAuthLevelTypes, AliasManager aliases) { var aliasList = new List <string>(); foreach (string typeUri in preferredAuthLevelTypes) { aliasList.Add(aliases.GetAlias(typeUri)); } return(PapeUtilities.ConcatenateListOfElements(aliasList)); }
/// <summary> /// Serializes the applied policies for transmission from the Provider /// to the Relying Party. /// </summary> /// <param name="policies">The applied policies.</param> /// <returns>A space-delimited list of applied policies.</returns> private static string SerializePolicies(IList <string> policies) { if (policies.Count == 0) { return(AuthenticationPolicies.None); } else { return(PapeUtilities.ConcatenateListOfElements(policies)); } }
/// <summary> /// Serializes the policies as a single string per the PAPE spec.. /// </summary> /// <param name="policies">The policies to include in the list.</param> /// <returns>The concatenated string of the given policies.</returns> private static string SerializePolicies(IEnumerable <string> policies) { return(PapeUtilities.ConcatenateListOfElements(policies)); }