private static SSODescriptorSuggestions GetSpSuggestions(SpSsoDescriptor sp) { var spSuggestions = new SSODescriptorSuggestions(); spSuggestions.SupportsSingleLogout = sp.SingleLogoutService.Any(); spSuggestions.PossiblySupportedNameIdFormats = sp.NameIdFormat; spSuggestions.SigningDetails = GetKeyDescriptorAsWell(sp, GetSigningInfo(sp.Signature)); return(spSuggestions); }
private static SSODescriptorSuggestions GetIdpSuggestions(IdpSsoDescriptor idp) { var idpSuggestions = new SSODescriptorSuggestions(); idpSuggestions.SupportsSingleLogout = idp.SingleLogoutService.Any(); idpSuggestions.PossiblySupportedNameIdFormats = idp.NameIdFormat; idpSuggestions.SigningDetails = GetKeyDescriptorAsWell(idp, GetSigningInfo(idp.Signature)); return(idpSuggestions); }
public static void WriteSsoInfo(SSODescriptorSuggestions sso) { Console.WriteLine("Service Provider Details:"); Console.WriteLine("Supports Single Logout: {0}", sso.SupportsSingleLogout); Console.Write("Possibly usable NameId Formats ({0}): ", sso.PossiblySupportedNameIdFormats?.Count() ?? 0); if (sso.PossiblySupportedNameIdFormats?.Any() ?? false) { Console.Write("\n"); foreach (var format in sso.PossiblySupportedNameIdFormats) { Console.WriteLine(" - {0}", format); } } else { Console.WriteLine("No NameId Formast Found"); } WriteSigningInfo(sso.SigningDetails); }