diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index 90d6a74..24b8b24 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -26,3 +26,24 @@ jobs:
- name: Test
run: dotnet test --no-build --verbosity normal
working-directory: CIE.AspNetCore.Authentication
+ - name: Restore dependencies WebApp
+ run: dotnet restore
+ working-directory: CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp
+ - name: Build WebApp
+ run: dotnet build --no-restore
+ working-directory: CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp
+ - name: Update apt repo
+ run: sudo apt update
+ - name: Install dependencies
+ run: sudo apt install -y libxml2-dev libxmlsec1-dev libxmlsec1-openssl xmlsec1 python3-pip
+ - name: Install spid-compliant-certificates cryptography correct version
+ run: sudo pip install -Iv cryptography==35.0.0
+ - name: Install spid-sp-test
+ run: sudo pip install spid-sp-test --upgrade --no-cache
+ - name: Run CIE.AspNetCore.WebApp
+ working-directory: CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp
+ run: dotnet bin/Debug/net6.0/CIE.AspNetCore.WebApp.dll &
+ - name: Test Metadata spid-sp-public with spid-sp-test
+ run: spid_sp_test --metadata-url https://localhost:5001/metadata-cie/metadata1.xml --extra --debug ERROR --profile cie-sp-public
+ - name: Test Metadata spid-sp-private with spid-sp-test
+ run: spid_sp_test --metadata-url https://localhost:5001/metadata-cie/metadata3.xml --extra --debug ERROR --profile cie-sp-private
diff --git a/.gitignore b/.gitignore
index dfcfd56..00aedca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,8 @@ bld/
# Visual Studio 2015/2017 cache/options directory
.vs/
+# Visual Studio Code options directory
+.vscode/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication.csproj b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication.csproj
index b056027..2636b7a 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication.csproj
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication.csproj
@@ -11,11 +11,11 @@
cie;aspnetcore;authentication
https://github.com/italia/cie-aspnetcore
MIT
- 1.1.3-prerelease4
- 1.1.3
- 1.1.3
- 1.1.3
- 1.1.3
+ 1.2.0-prerelease
+ 1.2.0
+ 1.2.0
+ 1.2.0
+ 1.2.0
true
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/CieHandler.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/CieHandler.cs
index ece8327..3691db0 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/CieHandler.cs
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/CieHandler.cs
@@ -1,4 +1,5 @@
using CIE.AspNetCore.Authentication.Events;
+using CIE.AspNetCore.Authentication.Extensions;
using CIE.AspNetCore.Authentication.Helpers;
using CIE.AspNetCore.Authentication.Models;
using CIE.AspNetCore.Authentication.Resources;
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/CieExtensions.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/CieExtensions.cs
index 323bc7a..a85bb18 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/CieExtensions.cs
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/CieExtensions.cs
@@ -9,8 +9,10 @@
using CIE.AspNetCore.Authentication.Models;
using System;
using System.Security.Claims;
+using Microsoft.AspNetCore.Builder;
+using CIE.AspNetCore.Authentication.Models.ServiceProviders;
-namespace CIE.AspNetCore.Authentication
+namespace CIE.AspNetCore.Authentication.Extensions
{
public static class CieExtensions
{
@@ -20,7 +22,26 @@ public static class CieExtensions
///
///
public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, IConfiguration configuration)
- => builder.AddCie(CieDefaults.AuthenticationScheme, configuration, _ => { });
+ => builder.AddCie(CieDefaults.AuthenticationScheme, o => { o.LoadFromConfiguration(configuration); });
+
+ ///
+ /// Registers the using the default authentication scheme, display name, and the given options configuration.
+ ///
+ ///
+ /// A delegate that configures the .
+ ///
+ public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, Action configureOptions)
+ => builder.AddCie(CieDefaults.AuthenticationScheme, configureOptions);
+
+ ///
+ /// Registers the using the given authentication scheme, default display name, and the given options configuration.
+ ///
+ ///
+ ///
+ /// A delegate that configures the .
+ ///
+ public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, string authenticationScheme, Action configureOptions)
+ => builder.AddCie(authenticationScheme, CieDefaults.DisplayName, configureOptions);
///
/// Registers the using the default authentication scheme, display name, and the given options configuration.
@@ -28,9 +49,10 @@ public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, I
///
/// A delegate that configures the .
///
+ /*
public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, IConfiguration configuration, Action configureOptions)
=> builder.AddCie(CieDefaults.AuthenticationScheme, configuration, configureOptions);
-
+ */
///
/// Registers the using the given authentication scheme, default display name, and the given options configuration.
///
@@ -38,8 +60,34 @@ public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, I
///
/// A delegate that configures the .
///
+ /*
public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, string authenticationScheme, IConfiguration configuration, Action configureOptions)
=> builder.AddCie(authenticationScheme, CieDefaults.DisplayName, configuration, configureOptions);
+ */
+
+ ///
+ /// Registers the using the given authentication scheme, display name, and options configuration.
+ ///
+ ///
+ ///
+ ///
+ /// A delegate that configures the .
+ ///
+ public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, string authenticationScheme, string displayName, Action configureOptions)
+ {
+ builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton, CiePostConfigureOptions>());
+ builder.Services.TryAdd(ServiceDescriptor.Singleton());
+ builder.Services.AddHttpClient("cie");
+ builder.Services.TryAddScoped(factory =>
+ {
+ var actionContext = factory.GetService().ActionContext;
+ var urlHelperFactory = factory.GetService();
+ return urlHelperFactory.GetUrlHelper(actionContext);
+ });
+ builder.Services.AddOptions().Configure(configureOptions);
+ builder.Services.TryAddScoped();
+ return builder.AddRemoteScheme(authenticationScheme, displayName, configureOptions);
+ }
///
/// Registers the using the given authentication scheme, display name, and options configuration.
@@ -49,6 +97,7 @@ public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, s
///
/// A delegate that configures the .
///
+ /*
public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, string authenticationScheme, string displayName, IConfiguration configuration, Action configureOptions)
{
builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton, CiePostConfigureOptions>());
@@ -63,6 +112,19 @@ public static AuthenticationBuilder AddCie(this AuthenticationBuilder builder, s
builder.Services.AddOptions().Configure(o => OptionsHelper.LoadFromConfiguration(o, configuration));
return builder.AddRemoteScheme(authenticationScheme, displayName, configureOptions);
}
+ */
+
+ public static AuthenticationBuilder AddServiceProvidersFactory(this AuthenticationBuilder builder)
+ where T : class, IServiceProvidersFactory
+ {
+ builder.Services.AddScoped();
+ return builder;
+ }
+
+ public static IApplicationBuilder AddCieSPMetadataEndpoints(this IApplicationBuilder builder)
+ {
+ return builder.UseMiddleware();
+ }
///
/// Finds the first value.
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/CieSPMetadataMiddleware.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/CieSPMetadataMiddleware.cs
new file mode 100644
index 0000000..c28705d
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/CieSPMetadataMiddleware.cs
@@ -0,0 +1,39 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Options;
+using CIE.AspNetCore.Authentication.Models;
+using CIE.AspNetCore.Authentication.Models.ServiceProviders;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace CIE.AspNetCore.Authentication.Extensions
+{
+ internal class CieSPMetadataMiddleware
+ {
+ private readonly RequestDelegate _next;
+
+ public CieSPMetadataMiddleware(RequestDelegate next)
+ {
+ _next = next;
+ }
+
+ public async Task Invoke(HttpContext context, IOptionsSnapshot options, IServiceProvidersFactory serviceProvidersFactory)
+ {
+ var serviceProviders = options.Value.ServiceProviders;
+
+ serviceProviders.AddRange(await serviceProvidersFactory.GetServiceProviders());
+
+ var serviceProvider = serviceProviders.FirstOrDefault(m =>
+ context.Request.Path.Equals($"{options.Value.ServiceProvidersMetadataEndpointsBasePath}/{m.FileName}", System.StringComparison.OrdinalIgnoreCase));
+ if (serviceProvider is not null)
+ {
+ var (result, contentType) = serviceProvider.Serialize();
+ context.Response.ContentType = contentType ?? "application/xml; charset=UTF-8";
+ await context.Response.WriteAsync(result);
+ await context.Response.Body.FlushAsync();
+ return;
+ }
+
+ await _next(context);
+ }
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/LoggingExtensions.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/LoggingExtensions.cs
index 31e503b..33383c2 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/LoggingExtensions.cs
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Extensions/LoggingExtensions.cs
@@ -1,7 +1,7 @@
using Microsoft.Extensions.Logging;
using System;
-namespace CIE.AspNetCore.Authentication
+namespace CIE.AspNetCore.Authentication.Extensions
{
internal static class LoggingExtensions
{
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Helpers/X509Helpers.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Helpers/X509Helpers.cs
index 9c240ce..31fc3d2 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Helpers/X509Helpers.cs
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Helpers/X509Helpers.cs
@@ -81,5 +81,8 @@ public static string CreateSignature(this string payload, X509Certificate2 certi
var hash = shaHash.ComputeHash(Encoding.UTF8.GetBytes(payload));
return Convert.ToBase64String(rsa.SignHash(hash, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1), Base64FormattingOptions.None);
}
+
+ public static byte[] ExportPublicKey(this X509Certificate2 cert)
+ => cert.Export(X509ContentType.Cert);
}
}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Helpers/XmlHelpers.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Helpers/XmlHelpers.cs
index 6380ba5..de31f04 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Helpers/XmlHelpers.cs
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Helpers/XmlHelpers.cs
@@ -145,5 +145,44 @@ public static XmlDocument SerializeToXmlDoc(this object o)
return doc;
}
+
+ public static XmlElement SerializeInternalExtensionToXmlElement(object o, string namespacePrefix, string xmlNamespace)
+ {
+ XmlDocument doc = SerializeExtensionToXmlElementInternal(o, namespacePrefix, xmlNamespace);
+
+ return doc.DocumentElement.FirstChild as XmlElement;
+ }
+
+ public static XmlElement SerializeExtensionToXmlElement(object o, string namespacePrefix, string xmlNamespace)
+ {
+ XmlDocument doc = SerializeExtensionToXmlElementInternal(o, namespacePrefix, xmlNamespace);
+
+ return doc.DocumentElement;
+ }
+
+ private static XmlDocument SerializeExtensionToXmlElementInternal(object o, string namespacePrefix, string xmlNamespace)
+ {
+ XmlDocument doc = new XmlDocument();
+
+ using (XmlWriter writer = doc.CreateNavigator().AppendChild())
+ {
+ var ns = new XmlSerializerNamespaces();
+ ns.Add(namespacePrefix, xmlNamespace);
+ new XmlSerializer(o.GetType()).Serialize(writer, o, ns);
+ }
+
+ return doc;
+ }
+
+ public static XmlElement GetXmlElement(string prefix, string prefixNamespace, string tag, string value = null)
+ {
+ XmlDocument doc = new XmlDocument();
+
+ XmlElement elem = doc.CreateElement(prefix, tag, prefixNamespace);
+ if(!string.IsNullOrEmpty(value))
+ elem.InnerText = value;
+
+ return elem;
+ }
}
}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/CieClaimTypes.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/CieClaimTypes.cs
index 36d4984..6b61290 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/CieClaimTypes.cs
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/CieClaimTypes.cs
@@ -1,4 +1,6 @@
-using System.Collections.Generic;
+using CIE.AspNetCore.Authentication.Saml;
+using System;
+using System.Collections.Generic;
namespace CIE.AspNetCore.Authentication.Models
{
@@ -24,5 +26,17 @@ private CieClaimTypes(string value)
public static CieClaimTypes FiscalNumber { get { return _types[nameof(FiscalNumber)]; } }
public static CieClaimTypes DateOfBirth { get { return _types[nameof(DateOfBirth)]; } }
public static CieClaimTypes RawFiscalNumber { get { return _types[nameof(RawFiscalNumber)]; } }
+
+ internal string GetSamlAttributeName()
+ {
+ return Value switch
+ {
+ nameof(Name) => SamlConst.name,
+ nameof(FamilyName) => SamlConst.familyName,
+ nameof(FiscalNumber) or nameof(RawFiscalNumber) => SamlConst.fiscalNumber,
+ nameof(DateOfBirth) => SamlConst.dateOfBirth,
+ _ => throw new Exception("Invalid ClaimType"),
+ };
+ }
}
}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/CieOptions.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/CieOptions.cs
index 3c3e1a6..448bfcd 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/CieOptions.cs
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/CieOptions.cs
@@ -1,14 +1,18 @@
using CIE.AspNetCore.Authentication.Events;
using CIE.AspNetCore.Authentication.Helpers;
+using CIE.AspNetCore.Authentication.Models.ServiceProviders;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
+using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
namespace CIE.AspNetCore.Authentication.Models
{
public class CieOptions : RemoteAuthenticationOptions
{
+ private readonly List _spMetadata = new();
+
public CieOptions()
{
CallbackPath = "/signin-cie";
@@ -16,6 +20,7 @@ public CieOptions()
// In AAD it sends the cleanup message to a random Reply Url and there's no deterministic way to configure it.
// If you manage to get it configured, then you can set RemoteSignOutPath accordingly.
RemoteSignOutPath = "/signout-cie";
+ ServiceProvidersMetadataEndpointsBasePath = "/metadata-cie";
Events = new CieEvents();
}
@@ -130,6 +135,22 @@ public override void Validate()
///
public CieClaimTypes PrincipalNameClaimType { get; set; } = CieClaimTypes.FiscalNumber;
+ ///
+ /// Gets or sets the base path where the configured SP metadata will be exposed.
+ ///
+ ///
+ /// The SP Metadata Endpoints BasePath.
+ ///
+ public PathString ServiceProvidersMetadataEndpointsBasePath { get; set; }
+
+ ///
+ /// Gets or sets the collection of the exposed SP metadata.
+ ///
+ ///
+ /// The collection of the exposed SP metadata.
+ ///
+ public List ServiceProviders { get { return _spMetadata; } }
+
public void LoadFromConfiguration(IConfiguration configuration)
{
var conf = OptionsHelper.CreateFromConfiguration(configuration);
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/AssertionConsumerService.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/AssertionConsumerService.cs
new file mode 100644
index 0000000..5e3cb0a
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/AssertionConsumerService.cs
@@ -0,0 +1,10 @@
+namespace CIE.AspNetCore.Authentication.Models.ServiceProviders
+{
+ public class AssertionConsumerService
+ {
+ public ProtocolBinding ProtocolBinding { get; set; }
+ public string Location { get; set; }
+ public ushort Index { get; set; } = 0;
+ public bool IsDefault { get; set; } = true;
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/AttributeConsumingService.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/AttributeConsumingService.cs
new file mode 100644
index 0000000..5fc93ff
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/AttributeConsumingService.cs
@@ -0,0 +1,10 @@
+namespace CIE.AspNetCore.Authentication.Models.ServiceProviders
+{
+ public class AttributeConsumingService
+ {
+ public ushort Index { get; set; } = 0;
+ public string ServiceName { get; set; }
+ public string ServiceDescription { get; set; }
+ public CieClaimTypes[] ClaimTypes { get; set; }
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ContactPerson.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ContactPerson.cs
new file mode 100644
index 0000000..cdfd487
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ContactPerson.cs
@@ -0,0 +1,167 @@
+using CIE.AspNetCore.Authentication.Saml.SP;
+using System.Collections.Generic;
+
+namespace CIE.AspNetCore.Authentication.Models.ServiceProviders
+{
+ public enum ContactKind
+ {
+ Private,
+ Public
+ }
+
+ public interface IContactPerson
+ {
+ ContactKind GetContactKind();
+ ContactTypeType ContactType { get; set; }
+ (bool, string) Validate();
+ Saml.SP.ContactType GetContactForXml(ServiceProvider sp);
+ }
+
+ public abstract class BaseContactPerson : IContactPerson
+ {
+ private string _province;
+ private string[] _nace2codes;
+
+ public string Municipality { get; set; }
+ public string Province { get { return Country != "IT" ? "EE" : _province; } set { _province = value; } }
+ public string Country { get; set; } = "IT";
+ public string Company { get; set; }
+ public string[] EmailAddress { get; set; }
+ public string[] TelephoneNumber { get; set; }
+ public ContactTypeType ContactType { get; set; }
+ public string VATNumber { get; set; }
+ public string FiscalCode { get; set; }
+ public string[] NACE2Codes { get { return _nace2codes; } set { _nace2codes = value; } }
+
+
+ public bool IsItalian()
+ {
+ return Country == "IT";
+ }
+
+ public Saml.SP.ContactType GetContactForXml(ServiceProvider sp)
+ {
+ //the code order is strange because spid-sp-test require to respect items order
+ var elements = new List();
+ var values = new List();
+ elements.Add(GetContactKind() == ContactKind.Private ? ItemsChoiceType7.Private : ItemsChoiceType7.Public);
+ values.Add(""); //Private and Public have no value
+ var (specElements, specValues) = GetSpecificElements();
+ elements.AddRange(specElements);
+ values.AddRange(specValues);
+ if (!string.IsNullOrWhiteSpace(VATNumber))
+ {
+ elements.Add(ItemsChoiceType7.VATNumber);
+ values.Add(this.VATNumber);
+ }
+ if (!string.IsNullOrWhiteSpace(FiscalCode))
+ {
+ elements.Add(ItemsChoiceType7.FiscalCode);
+ values.Add(this.FiscalCode);
+ }
+ if (NACE2Codes is not null && NACE2Codes.Length > 0)
+ foreach (var code in NACE2Codes)
+ {
+ elements.Add(ItemsChoiceType7.NACE2Code);
+ values.Add(code);
+ }
+
+ var extensions = new Saml.SP.ContactPersonSPExtensionType()
+ {
+ Items = values.ToArray(),
+ ItemsElementName = elements.ToArray(),
+ Municipality = this.Municipality,
+ Country = this.Country
+ };
+
+ if (!string.IsNullOrEmpty(this.Province))
+ extensions.Province = Province;
+
+ return new Saml.SP.ContactType()
+ {
+ contactType = this.ContactType,
+ Extensions = extensions,
+ Company = this.ContactType == ContactTypeType.administrative ? sp.OrganizationName : this.Company,
+ EmailAddress = this.EmailAddress,
+ TelephoneNumber = this.TelephoneNumber
+ };
+ }
+
+ public (bool, string) Validate()
+ {
+ if (string.IsNullOrWhiteSpace(Municipality))
+ return (false, $"No {nameof(Municipality)} are specified");
+ if (EmailAddress.Length == 0 || EmailAddress.Length == 1 && string.IsNullOrEmpty(EmailAddress[0]))
+ return (false, $"No {nameof(EmailAddress)} are specified");
+
+ return SpecificValidate();
+ }
+
+ public abstract (List, List) GetSpecificElements();
+
+ public abstract (bool, string) SpecificValidate();
+
+ public abstract ContactKind GetContactKind();
+ }
+
+ public class PrivateContactPerson : BaseContactPerson
+ {
+ public override ContactKind GetContactKind()
+ {
+ return ContactKind.Private;
+ }
+
+ public override (bool, string) SpecificValidate()
+ {
+ if (string.IsNullOrWhiteSpace(VATNumber)
+ && string.IsNullOrWhiteSpace(FiscalCode))
+ return (false, $"No {nameof(VATNumber)} or {nameof(FiscalCode)} were specified");
+
+ if (IsItalian() && (NACE2Codes.Length == 0 || NACE2Codes.Length == 1 && string.IsNullOrEmpty(NACE2Codes[0])))
+ return (false, $"No {nameof(NACE2Codes)} are specified, required for Italian company.");
+
+ return (true, "");
+ }
+
+ public override (List, List) GetSpecificElements()
+ {
+
+ return (new List(), new List());
+ }
+ }
+
+ public class PublicContactPerson : BaseContactPerson
+ {
+ public string IPACode { get; set; }
+ public string IPACategory { get; set; }
+
+ public override ContactKind GetContactKind()
+ {
+ return ContactKind.Public;
+ }
+
+ public override (bool, string) SpecificValidate()
+ {
+ if (string.IsNullOrWhiteSpace(IPACode))
+ return (false, $"No {nameof(IPACode)} are specified");
+
+ return (true, "");
+ }
+
+ public override (List, List) GetSpecificElements()
+ {
+ var elements = new List();
+ var values = new List();
+
+ elements.Add(ItemsChoiceType7.IPACode);
+ values.Add(this.IPACode);
+ if (!string.IsNullOrWhiteSpace(IPACategory))
+ {
+ elements.Add(ItemsChoiceType7.IPACategory);
+ values.Add(this.IPACategory);
+ }
+
+ return (elements, values);
+ }
+ }
+}
\ No newline at end of file
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/DefaultServiceProvidersFactory.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/DefaultServiceProvidersFactory.cs
new file mode 100644
index 0000000..8d58061
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/DefaultServiceProvidersFactory.cs
@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace CIE.AspNetCore.Authentication.Models.ServiceProviders
+{
+ internal class DefaultServiceProvidersFactory : IServiceProvidersFactory
+ {
+ public async Task> GetServiceProviders()
+ => await Task.FromResult(new List());
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/IServiceProvidersFactory.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/IServiceProvidersFactory.cs
new file mode 100644
index 0000000..90a6d4d
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/IServiceProvidersFactory.cs
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace CIE.AspNetCore.Authentication.Models.ServiceProviders
+{
+ public interface IServiceProvidersFactory
+ {
+ Task> GetServiceProviders();
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ProtocolBinding.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ProtocolBinding.cs
new file mode 100644
index 0000000..97786fa
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ProtocolBinding.cs
@@ -0,0 +1,8 @@
+namespace CIE.AspNetCore.Authentication.Models.ServiceProviders
+{
+ public enum ProtocolBinding
+ {
+ POST,
+ Redirect
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ServiceProvider.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ServiceProvider.cs
new file mode 100644
index 0000000..bda63d6
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ServiceProvider.cs
@@ -0,0 +1,26 @@
+using CIE.AspNetCore.Authentication.Helpers;
+using CIE.AspNetCore.Authentication.Saml;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Cryptography.X509Certificates;
+
+namespace CIE.AspNetCore.Authentication.Models.ServiceProviders
+{
+ public abstract class ServiceProvider
+ {
+ public string FileName { get; set; }
+ public Guid Id { get; set; }
+ public X509Certificate2 Certificate { get; set; }
+ public string Language { get; set; } = "it";
+ public List SingleLogoutServiceLocations { get; set; } = new();
+ public List AssertionConsumerServices { get; set; } = new();
+ public List AttributeConsumingServices { get; set; } = new();
+ public string OrganizationDisplayName { get; set; }
+ public string OrganizationName { get; set; }
+ public string OrganizationURL { get; set; }
+ public List ContactPersons { get; set; } = new();
+
+ public abstract (string result, string contentType) Serialize();
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ServiceProviderStandard.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ServiceProviderStandard.cs
new file mode 100644
index 0000000..4fafde9
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/ServiceProviderStandard.cs
@@ -0,0 +1,97 @@
+using CIE.AspNetCore.Authentication.Helpers;
+using CIE.AspNetCore.Authentication.Saml;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Xml;
+
+namespace CIE.AspNetCore.Authentication.Models.ServiceProviders
+{
+ public sealed class ServiceProviderStandard : ServiceProvider
+ {
+ public string EntityId { get; set; }
+
+ public override (string result, string contentType) Serialize()
+ {
+ Saml.SP.EntityDescriptorType metadata = new Saml.SP.EntityDescriptorType()
+ {
+ entityID = EntityId,
+ ID = $"_{Id}",
+ SPSSODescriptor = new Saml.SP.SPSSODescriptorType(){
+ KeyDescriptor = new Saml.SP.KeyDescriptorType[]{
+ new Saml.SP.KeyDescriptorType(){
+ use = Saml.SP.KeyTypes.signing,
+ KeyInfo = new Saml.SP.KeyInfoType
+ {
+ ItemsElementName = new Saml.SP.ItemsChoiceType2[]{ Saml.SP.ItemsChoiceType2.X509Data },
+ Items = new Saml.SP.X509DataType[]{
+ new Saml.SP.X509DataType{
+ ItemsElementName = new Saml.SP.ItemsChoiceType[]{ Saml.SP.ItemsChoiceType.X509Certificate },
+ Items = new object[]{ Certificate.ExportPublicKey() }
+ }
+ }
+ }
+ },
+ new Saml.SP.KeyDescriptorType(){
+ use = Saml.SP.KeyTypes.encryption,
+ KeyInfo = new Saml.SP.KeyInfoType
+ {
+ ItemsElementName = new Saml.SP.ItemsChoiceType2[]{ Saml.SP.ItemsChoiceType2.X509Data },
+ Items = new Saml.SP.X509DataType[]{
+ new Saml.SP.X509DataType{
+ ItemsElementName = new Saml.SP.ItemsChoiceType[]{ Saml.SP.ItemsChoiceType.X509Certificate },
+ Items = new object[]{ Certificate.ExportPublicKey() }
+ }
+ }
+ }
+ }
+ },
+ AuthnRequestsSigned = true,
+ WantAssertionsSigned = true,
+ protocolSupportEnumeration = new string[]{ SamlConst.Saml2pProtocol },
+ SingleLogoutService = SingleLogoutServiceLocations.Select(s => new Saml.SP.SingleLogoutServiceType(){
+ Binding = s.ProtocolBinding == ProtocolBinding.POST ? Saml.SP.SingleLogoutServiceBindingType.urnoasisnamestcSAML20bindingsHTTPPOST : Saml.SP.SingleLogoutServiceBindingType.urnoasisnamestcSAML20bindingsHTTPRedirect,
+ Location = s.Location
+ }).ToArray(),
+ NameIDFormat = SamlConst.NameIDPolicyFormat ,
+ AssertionConsumerService = AssertionConsumerServices.Select(s => new Saml.SP.AssertionConsumerServiceType(){
+ Binding = s.ProtocolBinding == ProtocolBinding.POST ? SamlConst.ProtocolBindingPOST : SamlConst.ProtocolBindingRedirect,
+ Location = s.Location,
+ index = s.Index,
+ isDefault = s.IsDefault,
+ isDefaultSpecified = true
+ }).ToArray(),
+ AttributeConsumingService = AttributeConsumingServices.Select(s => new Saml.SP.AttributeConsumingServiceType(){
+ index = s.Index,
+ ServiceName = new Saml.SP.UUID[]{ new Saml.SP.UUID(){lang = "", Value = Guid.NewGuid().ToString() } },//TODO: capire se posso rigenerarlo ogni volta o se serve salvarlo in qualche modo
+ ServiceDescription = new Saml.SP.localizedNameType[]{ new Saml.SP.localizedNameType(){lang = Language, Value = s.ServiceDescription } },
+ RequestedAttribute = s.ClaimTypes.Select(c => new Saml.SP.RequestedAttributeType(){
+ NameFormat = SamlConst.RequestedAttributeNameFormat,
+ Name = c.GetSamlAttributeName()
+ }).ToArray()
+ }).ToArray(),
+ },
+ Organization = new Saml.SP.OrganizationType()
+ {
+ OrganizationDisplayName = new Saml.SP.localizedNameType[] { new Saml.SP.localizedNameType { lang = Language, Value = OrganizationDisplayName } },
+ OrganizationName = new Saml.SP.localizedNameType[] { new Saml.SP.localizedNameType { lang = Language, Value = OrganizationName } },
+ OrganizationURL = new Saml.SP.localizedURIType[] { new Saml.SP.localizedURIType { lang = Language, Value = OrganizationURL } },
+ },
+ ContactPerson = ContactPersons.Select(s => CheckContactAndGetIt(s)).ToArray()
+ };
+
+ var result = SamlHandler.SignSerializedMetadata(SamlHandler.SerializeMetadata(metadata), Certificate, metadata.ID);
+
+ return (result, "application/xml; charset=UTF-8");
+ }
+
+ private Saml.SP.ContactType CheckContactAndGetIt(IContactPerson c){
+ (var res, var errmsg)= c.Validate();
+
+ if(!res)
+ throw new Exception(errmsg);
+
+ return c.GetContactForXml(this);
+ }
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/SingleLogoutServiceLocation.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/SingleLogoutServiceLocation.cs
new file mode 100644
index 0000000..422245b
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Models/ServiceProviders/SingleLogoutServiceLocation.cs
@@ -0,0 +1,8 @@
+namespace CIE.AspNetCore.Authentication.Models.ServiceProviders
+{
+ public class SingleLogoutService
+ {
+ public ProtocolBinding ProtocolBinding { get; set; }
+ public string Location { get; set; }
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/SamlConst.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/SamlConst.cs
index 2ce040a..8ec1f13 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/SamlConst.cs
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/SamlConst.cs
@@ -13,13 +13,21 @@ internal class SamlConst
public static string Version = "2.0";
public static string Success = "urn:oasis:names:tc:SAML:2.0:status:Success";
public static string IssuerFormat = "urn:oasis:names:tc:SAML:2.0:nameid-format:entity";
- public static string ProtocolBinding = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST";
+ public static string ProtocolBindingPOST = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST";
+ public static string ProtocolBindingRedirect = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect";
public static string NameIDPolicyFormat = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient";
+ public static string RequestedAttributeNameFormat = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic";
public static string Saml2pProtocol = "urn:oasis:names:tc:SAML:2.0:protocol";
public static string LogoutUserProtocol = "urn:oasis:names:tc:SAML:2.0:logout:user";
public static string samlp = nameof(samlp);
public static string saml = nameof(saml);
+ public static string md = nameof(md);
+ public static string ds = nameof(ds);
+ public static string cie = nameof(cie);
+ public static string xmldsigNamespace = "http://www.w3.org/2000/09/xmldsig#";
+ public static string cieNamespace = "https://www.cartaidentita.interno.gov.it/saml-extensions";
public static string Saml2Assertion = "urn:oasis:names:tc:SAML:2.0:assertion";
+ public static string Saml2pMetadata = "urn:oasis:names:tc:SAML:2.0:metadata";
public static string SpidL = "https://www.spid.gov.it/SpidL";
public static string Method = "urn:oasis:names:tc:SAML:2.0:cm:bearer";
public static string name = nameof(name);
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/SamlHandler.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/SamlHandler.cs
index 36eee8a..03c2617 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/SamlHandler.cs
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/SamlHandler.cs
@@ -20,11 +20,10 @@ internal static class SamlHandler
{ typeof(ResponseType), new XmlSerializer(typeof(ResponseType)) },
{ typeof(LogoutRequestType), new XmlSerializer(typeof(LogoutRequestType)) },
{ typeof(LogoutResponseType), new XmlSerializer(typeof(LogoutResponseType)) },
+ { typeof(SP.EntityDescriptorType), new XmlSerializer(typeof(SP.EntityDescriptorType)) },
};
private static readonly List listAuthRefValid = new List
{
- SamlConst.SpidL + "1",
- SamlConst.SpidL + "2",
SamlConst.SpidL + "3"
};
@@ -468,6 +467,27 @@ public static bool ValidateLogoutResponse(LogoutResponseType response, LogoutReq
return (response.InResponseTo == request.ID);
}
+ public static string SerializeMetadata(T message) where T : class
+ {
+ var serializer = serializers[typeof(T)];
+ var ns = new XmlSerializerNamespaces();
+ ns.Add(SamlConst.md, SamlConst.Saml2pMetadata);
+ ns.Add(SamlConst.ds, SamlConst.xmldsigNamespace);
+ ns.Add(SamlConst.cie, SamlConst.cieNamespace);
+
+ var settings = new XmlWriterSettings
+ {
+ OmitXmlDeclaration = true,
+ Indent = false,
+ Encoding = Encoding.UTF8
+ };
+
+ using var stringWriter = new StringWriter();
+ using var responseWriter = XmlTextWriter.Create(stringWriter, settings);
+ serializer.Serialize(responseWriter, message, ns);
+ return stringWriter.ToString();
+ }
+
///
/// Serializes the message.
///
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/cie.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/cie.cs
new file mode 100644
index 0000000..facd5f1
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/cie.cs
@@ -0,0 +1,4826 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+//
+// This source code was auto-generated by xsd, Version=4.8.3928.0.
+//
+namespace CIE.AspNetCore.Authentication.Saml.SP {
+ using System.Xml.Serialization;
+
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("Extensions", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class ExtensionsType {
+
+ private System.Xml.XmlElement[] anyField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("AffiliationDescriptor", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class AffiliationDescriptorType {
+
+ private SignatureType signatureField;
+
+ private ExtensionsType extensionsField;
+
+ private string[] affiliateMemberField;
+
+ private KeyDescriptorType[] keyDescriptorField;
+
+ private string affiliationOwnerIDField;
+
+ private System.DateTime validUntilField;
+
+ private bool validUntilFieldSpecified;
+
+ private string cacheDurationField;
+
+ private string idField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ public SignatureType Signature {
+ get {
+ return this.signatureField;
+ }
+ set {
+ this.signatureField = value;
+ }
+ }
+
+ ///
+ public ExtensionsType Extensions {
+ get {
+ return this.extensionsField;
+ }
+ set {
+ this.extensionsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AffiliateMember", DataType="anyURI")]
+ public string[] AffiliateMember {
+ get {
+ return this.affiliateMemberField;
+ }
+ set {
+ this.affiliateMemberField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("KeyDescriptor")]
+ public KeyDescriptorType[] KeyDescriptor {
+ get {
+ return this.keyDescriptorField;
+ }
+ set {
+ this.keyDescriptorField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string affiliationOwnerID {
+ get {
+ return this.affiliationOwnerIDField;
+ }
+ set {
+ this.affiliationOwnerIDField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public System.DateTime validUntil {
+ get {
+ return this.validUntilField;
+ }
+ set {
+ this.validUntilField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool validUntilSpecified {
+ get {
+ return this.validUntilFieldSpecified;
+ }
+ set {
+ this.validUntilFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="duration")]
+ public string cacheDuration {
+ get {
+ return this.cacheDurationField;
+ }
+ set {
+ this.cacheDurationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string ID {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("Signature", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class SignatureType {
+
+ private SignedInfoType signedInfoField;
+
+ private SignatureValueType signatureValueField;
+
+ private KeyInfoType keyInfoField;
+
+ private ObjectType[] objectField;
+
+ private string idField;
+
+ ///
+ public SignedInfoType SignedInfo {
+ get {
+ return this.signedInfoField;
+ }
+ set {
+ this.signedInfoField = value;
+ }
+ }
+
+ ///
+ public SignatureValueType SignatureValue {
+ get {
+ return this.signatureValueField;
+ }
+ set {
+ this.signatureValueField = value;
+ }
+ }
+
+ ///
+ public KeyInfoType KeyInfo {
+ get {
+ return this.keyInfoField;
+ }
+ set {
+ this.keyInfoField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Object")]
+ public ObjectType[] Object {
+ get {
+ return this.objectField;
+ }
+ set {
+ this.objectField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("SignedInfo", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class SignedInfoType {
+
+ private CanonicalizationMethodType canonicalizationMethodField;
+
+ private SignatureMethodType signatureMethodField;
+
+ private ReferenceType[] referenceField;
+
+ private string idField;
+
+ ///
+ public CanonicalizationMethodType CanonicalizationMethod {
+ get {
+ return this.canonicalizationMethodField;
+ }
+ set {
+ this.canonicalizationMethodField = value;
+ }
+ }
+
+ ///
+ public SignatureMethodType SignatureMethod {
+ get {
+ return this.signatureMethodField;
+ }
+ set {
+ this.signatureMethodField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Reference")]
+ public ReferenceType[] Reference {
+ get {
+ return this.referenceField;
+ }
+ set {
+ this.referenceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("CanonicalizationMethod", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class CanonicalizationMethodType {
+
+ private System.Xml.XmlNode[] anyField;
+
+ private string algorithmField;
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlNode[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Algorithm {
+ get {
+ return this.algorithmField;
+ }
+ set {
+ this.algorithmField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("SignatureMethod", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class SignatureMethodType {
+
+ private string hMACOutputLengthField;
+
+ private System.Xml.XmlNode[] anyField;
+
+ private string algorithmField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
+ public string HMACOutputLength {
+ get {
+ return this.hMACOutputLengthField;
+ }
+ set {
+ this.hMACOutputLengthField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlNode[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Algorithm {
+ get {
+ return this.algorithmField;
+ }
+ set {
+ this.algorithmField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("Reference", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class ReferenceType {
+
+ private TransformType[] transformsField;
+
+ private DigestMethodType digestMethodField;
+
+ private byte[] digestValueField;
+
+ private string idField;
+
+ private string uRIField;
+
+ private string typeField;
+
+ ///
+ [System.Xml.Serialization.XmlArrayItemAttribute("Transform", IsNullable=false)]
+ public TransformType[] Transforms {
+ get {
+ return this.transformsField;
+ }
+ set {
+ this.transformsField = value;
+ }
+ }
+
+ ///
+ public DigestMethodType DigestMethod {
+ get {
+ return this.digestMethodField;
+ }
+ set {
+ this.digestMethodField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] DigestValue {
+ get {
+ return this.digestValueField;
+ }
+ set {
+ this.digestValueField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string URI {
+ get {
+ return this.uRIField;
+ }
+ set {
+ this.uRIField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Type {
+ get {
+ return this.typeField;
+ }
+ set {
+ this.typeField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("Transform", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class TransformType {
+
+ private object[] itemsField;
+
+ private string[] textField;
+
+ private string algorithmField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ [System.Xml.Serialization.XmlElementAttribute("XPath", typeof(string))]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string[] Text {
+ get {
+ return this.textField;
+ }
+ set {
+ this.textField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Algorithm {
+ get {
+ return this.algorithmField;
+ }
+ set {
+ this.algorithmField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("DigestMethod", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class DigestMethodType {
+
+ private System.Xml.XmlNode[] anyField;
+
+ private string algorithmField;
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlNode[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Algorithm {
+ get {
+ return this.algorithmField;
+ }
+ set {
+ this.algorithmField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("SignatureValue", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class SignatureValueType {
+
+ private string idField;
+
+ private byte[] valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute(DataType="base64Binary")]
+ public byte[] Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("KeyInfo", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class KeyInfoType {
+
+ private object[] itemsField;
+
+ private ItemsChoiceType2[] itemsElementNameField;
+
+ private string[] textField;
+
+ private string idField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ [System.Xml.Serialization.XmlElementAttribute("KeyName", typeof(string))]
+ [System.Xml.Serialization.XmlElementAttribute("KeyValue", typeof(KeyValueType))]
+ [System.Xml.Serialization.XmlElementAttribute("MgmtData", typeof(string))]
+ [System.Xml.Serialization.XmlElementAttribute("PGPData", typeof(PGPDataType))]
+ [System.Xml.Serialization.XmlElementAttribute("RetrievalMethod", typeof(RetrievalMethodType))]
+ [System.Xml.Serialization.XmlElementAttribute("SPKIData", typeof(SPKIDataType))]
+ [System.Xml.Serialization.XmlElementAttribute("X509Data", typeof(X509DataType))]
+ [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public ItemsChoiceType2[] ItemsElementName {
+ get {
+ return this.itemsElementNameField;
+ }
+ set {
+ this.itemsElementNameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string[] Text {
+ get {
+ return this.textField;
+ }
+ set {
+ this.textField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("KeyValue", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class KeyValueType {
+
+ private object itemField;
+
+ private string[] textField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ [System.Xml.Serialization.XmlElementAttribute("DSAKeyValue", typeof(DSAKeyValueType))]
+ [System.Xml.Serialization.XmlElementAttribute("RSAKeyValue", typeof(RSAKeyValueType))]
+ public object Item {
+ get {
+ return this.itemField;
+ }
+ set {
+ this.itemField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string[] Text {
+ get {
+ return this.textField;
+ }
+ set {
+ this.textField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("DSAKeyValue", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class DSAKeyValueType {
+
+ private byte[] pField;
+
+ private byte[] qField;
+
+ private byte[] gField;
+
+ private byte[] yField;
+
+ private byte[] jField;
+
+ private byte[] seedField;
+
+ private byte[] pgenCounterField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] P {
+ get {
+ return this.pField;
+ }
+ set {
+ this.pField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] Q {
+ get {
+ return this.qField;
+ }
+ set {
+ this.qField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] G {
+ get {
+ return this.gField;
+ }
+ set {
+ this.gField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] Y {
+ get {
+ return this.yField;
+ }
+ set {
+ this.yField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] J {
+ get {
+ return this.jField;
+ }
+ set {
+ this.jField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] Seed {
+ get {
+ return this.seedField;
+ }
+ set {
+ this.seedField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] PgenCounter {
+ get {
+ return this.pgenCounterField;
+ }
+ set {
+ this.pgenCounterField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("RSAKeyValue", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class RSAKeyValueType {
+
+ private byte[] modulusField;
+
+ private byte[] exponentField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] Modulus {
+ get {
+ return this.modulusField;
+ }
+ set {
+ this.modulusField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] Exponent {
+ get {
+ return this.exponentField;
+ }
+ set {
+ this.exponentField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("PGPData", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class PGPDataType {
+
+ private object[] itemsField;
+
+ private ItemsChoiceType1[] itemsElementNameField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ [System.Xml.Serialization.XmlElementAttribute("PGPKeyID", typeof(byte[]), DataType="base64Binary")]
+ [System.Xml.Serialization.XmlElementAttribute("PGPKeyPacket", typeof(byte[]), DataType="base64Binary")]
+ [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public ItemsChoiceType1[] ItemsElementName {
+ get {
+ return this.itemsElementNameField;
+ }
+ set {
+ this.itemsElementNameField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#", IncludeInSchema=false)]
+ public enum ItemsChoiceType1 {
+
+ ///
+ [System.Xml.Serialization.XmlEnumAttribute("##any:")]
+ Item,
+
+ ///
+ PGPKeyID,
+
+ ///
+ PGPKeyPacket,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("RetrievalMethod", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class RetrievalMethodType {
+
+ private TransformType[] transformsField;
+
+ private string uRIField;
+
+ private string typeField;
+
+ ///
+ [System.Xml.Serialization.XmlArrayItemAttribute("Transform", IsNullable=false)]
+ public TransformType[] Transforms {
+ get {
+ return this.transformsField;
+ }
+ set {
+ this.transformsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string URI {
+ get {
+ return this.uRIField;
+ }
+ set {
+ this.uRIField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Type {
+ get {
+ return this.typeField;
+ }
+ set {
+ this.typeField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("SPKIData", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class SPKIDataType {
+
+ private byte[][] sPKISexpField;
+
+ private System.Xml.XmlElement anyField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("SPKISexp", DataType="base64Binary")]
+ public byte[][] SPKISexp {
+ get {
+ return this.sPKISexpField;
+ }
+ set {
+ this.sPKISexpField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("X509Data", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class X509DataType {
+
+ private object[] itemsField;
+
+ private ItemsChoiceType[] itemsElementNameField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ [System.Xml.Serialization.XmlElementAttribute("X509CRL", typeof(byte[]), DataType="base64Binary")]
+ [System.Xml.Serialization.XmlElementAttribute("X509Certificate", typeof(byte[]), DataType="base64Binary")]
+ [System.Xml.Serialization.XmlElementAttribute("X509IssuerSerial", typeof(X509IssuerSerialType))]
+ [System.Xml.Serialization.XmlElementAttribute("X509SKI", typeof(byte[]), DataType="base64Binary")]
+ [System.Xml.Serialization.XmlElementAttribute("X509SubjectName", typeof(string))]
+ [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public ItemsChoiceType[] ItemsElementName {
+ get {
+ return this.itemsElementNameField;
+ }
+ set {
+ this.itemsElementNameField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ public partial class X509IssuerSerialType {
+
+ private string x509IssuerNameField;
+
+ private string x509SerialNumberField;
+
+ ///
+ public string X509IssuerName {
+ get {
+ return this.x509IssuerNameField;
+ }
+ set {
+ this.x509IssuerNameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
+ public string X509SerialNumber {
+ get {
+ return this.x509SerialNumberField;
+ }
+ set {
+ this.x509SerialNumberField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#", IncludeInSchema=false)]
+ public enum ItemsChoiceType {
+
+ ///
+ [System.Xml.Serialization.XmlEnumAttribute("##any:")]
+ Item,
+
+ ///
+ X509CRL,
+
+ ///
+ X509Certificate,
+
+ ///
+ X509IssuerSerial,
+
+ ///
+ X509SKI,
+
+ ///
+ X509SubjectName,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#", IncludeInSchema=false)]
+ public enum ItemsChoiceType2 {
+
+ ///
+ [System.Xml.Serialization.XmlEnumAttribute("##any:")]
+ Item,
+
+ ///
+ KeyName,
+
+ ///
+ KeyValue,
+
+ ///
+ MgmtData,
+
+ ///
+ PGPData,
+
+ ///
+ RetrievalMethod,
+
+ ///
+ SPKIData,
+
+ ///
+ X509Data,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("Object", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class ObjectType {
+
+ private System.Xml.XmlNode[] anyField;
+
+ private string idField;
+
+ private string mimeTypeField;
+
+ private string encodingField;
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlNode[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string MimeType {
+ get {
+ return this.mimeTypeField;
+ }
+ set {
+ this.mimeTypeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Encoding {
+ get {
+ return this.encodingField;
+ }
+ set {
+ this.encodingField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("KeyDescriptor", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class KeyDescriptorType {
+
+ private KeyInfoType keyInfoField;
+
+ private EncryptionMethodType[] encryptionMethodField;
+
+ private KeyTypes useField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ public KeyInfoType KeyInfo {
+ get {
+ return this.keyInfoField;
+ }
+ set {
+ this.keyInfoField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("EncryptionMethod")]
+ public EncryptionMethodType[] EncryptionMethod {
+ get {
+ return this.encryptionMethodField;
+ }
+ set {
+ this.encryptionMethodField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public KeyTypes use {
+ get {
+ return this.useField;
+ }
+ set {
+ this.useField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ [System.Xml.Serialization.XmlRootAttribute("EncryptionMethod", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class EncryptionMethodType {
+
+ private string keySizeField;
+
+ private byte[] oAEPparamsField;
+
+ private System.Xml.XmlNode[] anyField;
+
+ private string algorithmField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
+ public string KeySize {
+ get {
+ return this.keySizeField;
+ }
+ set {
+ this.keySizeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] OAEPparams {
+ get {
+ return this.oAEPparamsField;
+ }
+ set {
+ this.oAEPparamsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlNode[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Algorithm {
+ get {
+ return this.algorithmField;
+ }
+ set {
+ this.algorithmField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ public enum KeyTypes {
+
+ ///
+ encryption,
+
+ ///
+ signing,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("EntitiesDescriptor", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class EntitiesDescriptorType {
+
+ private SignatureType signatureField;
+
+ private ExtensionsType extensionsField;
+
+ private object[] itemsField;
+
+ private System.DateTime validUntilField;
+
+ private bool validUntilFieldSpecified;
+
+ private string cacheDurationField;
+
+ private string idField;
+
+ private string nameField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ public SignatureType Signature {
+ get {
+ return this.signatureField;
+ }
+ set {
+ this.signatureField = value;
+ }
+ }
+
+ ///
+ public ExtensionsType Extensions {
+ get {
+ return this.extensionsField;
+ }
+ set {
+ this.extensionsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("EntitiesDescriptor", typeof(EntitiesDescriptorType))]
+ [System.Xml.Serialization.XmlElementAttribute("EntityDescriptor", typeof(EntityDescriptorType))]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public System.DateTime validUntil {
+ get {
+ return this.validUntilField;
+ }
+ set {
+ this.validUntilField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool validUntilSpecified {
+ get {
+ return this.validUntilFieldSpecified;
+ }
+ set {
+ this.validUntilFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="duration")]
+ public string cacheDuration {
+ get {
+ return this.cacheDurationField;
+ }
+ set {
+ this.cacheDurationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string ID {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string Name {
+ get {
+ return this.nameField;
+ }
+ set {
+ this.nameField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("EntityDescriptor", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class EntityDescriptorType {
+
+ private SignatureType signatureField;
+
+ private ExtensionsType extensionsField;
+
+ private SPSSODescriptorType sPSSODescriptorField;
+
+ private OrganizationType organizationField;
+
+ private ContactType[] contactPersonField;
+
+ private AdditionalMetadataLocationType[] additionalMetadataLocationField;
+
+ private string entityIDField;
+
+ private System.DateTime validUntilField;
+
+ private bool validUntilFieldSpecified;
+
+ private string cacheDurationField;
+
+ private string idField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ public SignatureType Signature {
+ get {
+ return this.signatureField;
+ }
+ set {
+ this.signatureField = value;
+ }
+ }
+
+ ///
+ public ExtensionsType Extensions {
+ get {
+ return this.extensionsField;
+ }
+ set {
+ this.extensionsField = value;
+ }
+ }
+
+ ///
+ public SPSSODescriptorType SPSSODescriptor {
+ get {
+ return this.sPSSODescriptorField;
+ }
+ set {
+ this.sPSSODescriptorField = value;
+ }
+ }
+
+ ///
+ public OrganizationType Organization {
+ get {
+ return this.organizationField;
+ }
+ set {
+ this.organizationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ContactPerson")]
+ public ContactType[] ContactPerson {
+ get {
+ return this.contactPersonField;
+ }
+ set {
+ this.contactPersonField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AdditionalMetadataLocation")]
+ public AdditionalMetadataLocationType[] AdditionalMetadataLocation {
+ get {
+ return this.additionalMetadataLocationField;
+ }
+ set {
+ this.additionalMetadataLocationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string entityID {
+ get {
+ return this.entityIDField;
+ }
+ set {
+ this.entityIDField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public System.DateTime validUntil {
+ get {
+ return this.validUntilField;
+ }
+ set {
+ this.validUntilField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool validUntilSpecified {
+ get {
+ return this.validUntilFieldSpecified;
+ }
+ set {
+ this.validUntilFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="duration")]
+ public string cacheDuration {
+ get {
+ return this.cacheDurationField;
+ }
+ set {
+ this.cacheDurationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string ID {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("SPSSODescriptor", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class SPSSODescriptorType : SSODescriptorType {
+
+ private AssertionConsumerServiceType[] assertionConsumerServiceField;
+
+ private AttributeConsumingServiceType[] attributeConsumingServiceField;
+
+ private bool authnRequestsSignedField;
+
+ private bool wantAssertionsSignedField;
+
+ public SPSSODescriptorType() {
+ this.authnRequestsSignedField = true;
+ this.wantAssertionsSignedField = true;
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AssertionConsumerService")]
+ public AssertionConsumerServiceType[] AssertionConsumerService {
+ get {
+ return this.assertionConsumerServiceField;
+ }
+ set {
+ this.assertionConsumerServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AttributeConsumingService")]
+ public AttributeConsumingServiceType[] AttributeConsumingService {
+ get {
+ return this.attributeConsumingServiceField;
+ }
+ set {
+ this.attributeConsumingServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public bool AuthnRequestsSigned {
+ get {
+ return this.authnRequestsSignedField;
+ }
+ set {
+ this.authnRequestsSignedField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public bool WantAssertionsSigned {
+ get {
+ return this.wantAssertionsSignedField;
+ }
+ set {
+ this.wantAssertionsSignedField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("AssertionConsumerService", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class AssertionConsumerServiceType : IndexedEndpointType {
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssertionConsumerServiceType))]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("ArtifactResolutionService", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class IndexedEndpointType : EndpointType {
+
+ private ushort indexField;
+
+ private bool isDefaultField;
+
+ private bool isDefaultFieldSpecified;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public ushort index {
+ get {
+ return this.indexField;
+ }
+ set {
+ this.indexField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public bool isDefault {
+ get {
+ return this.isDefaultField;
+ }
+ set {
+ this.isDefaultField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool isDefaultSpecified {
+ get {
+ return this.isDefaultFieldSpecified;
+ }
+ set {
+ this.isDefaultFieldSpecified = value;
+ }
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(IndexedEndpointType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssertionConsumerServiceType))]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("ManageNameIDService", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class EndpointType {
+
+ private System.Xml.XmlElement[] anyField;
+
+ private string bindingField;
+
+ private string locationField;
+
+ private string responseLocationField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Binding {
+ get {
+ return this.bindingField;
+ }
+ set {
+ this.bindingField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Location {
+ get {
+ return this.locationField;
+ }
+ set {
+ this.locationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string ResponseLocation {
+ get {
+ return this.responseLocationField;
+ }
+ set {
+ this.responseLocationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("AttributeConsumingService", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class AttributeConsumingServiceType {
+
+ private UUID[] serviceNameField;
+
+ private localizedNameType[] serviceDescriptionField;
+
+ private RequestedAttributeType[] requestedAttributeField;
+
+ private ushort indexField;
+
+ private bool isDefaultField;
+
+ private bool isDefaultFieldSpecified;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ServiceName")]
+ public UUID[] ServiceName {
+ get {
+ return this.serviceNameField;
+ }
+ set {
+ this.serviceNameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ServiceDescription")]
+ public localizedNameType[] ServiceDescription {
+ get {
+ return this.serviceDescriptionField;
+ }
+ set {
+ this.serviceDescriptionField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("RequestedAttribute")]
+ public RequestedAttributeType[] RequestedAttribute {
+ get {
+ return this.requestedAttributeField;
+ }
+ set {
+ this.requestedAttributeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public ushort index {
+ get {
+ return this.indexField;
+ }
+ set {
+ this.indexField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public bool isDefault {
+ get {
+ return this.isDefaultField;
+ }
+ set {
+ this.isDefaultField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool isDefaultSpecified {
+ get {
+ return this.isDefaultFieldSpecified;
+ }
+ set {
+ this.isDefaultFieldSpecified = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("ServiceName", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class UUID {
+
+ private string langField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://www.w3.org/XML/1998/namespace")]
+ public string lang {
+ get {
+ return this.langField;
+ }
+ set {
+ this.langField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("OrganizationName", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class localizedNameType {
+
+ private string langField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://www.w3.org/XML/1998/namespace")]
+ public string lang {
+ get {
+ return this.langField;
+ }
+ set {
+ this.langField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("RequestedAttribute", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class RequestedAttributeType : AttributeType {
+
+ private bool isRequiredField;
+
+ private bool isRequiredFieldSpecified;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public bool isRequired {
+ get {
+ return this.isRequiredField;
+ }
+ set {
+ this.isRequiredField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool isRequiredSpecified {
+ get {
+ return this.isRequiredFieldSpecified;
+ }
+ set {
+ this.isRequiredFieldSpecified = value;
+ }
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequestedAttributeType))]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("Attribute", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class AttributeType {
+
+ private object[] attributeValueField;
+
+ private string nameField;
+
+ private string nameFormatField;
+
+ private string friendlyNameField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AttributeValue", IsNullable=true)]
+ public object[] AttributeValue {
+ get {
+ return this.attributeValueField;
+ }
+ set {
+ this.attributeValueField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string Name {
+ get {
+ return this.nameField;
+ }
+ set {
+ this.nameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string NameFormat {
+ get {
+ return this.nameFormatField;
+ }
+ set {
+ this.nameFormatField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string FriendlyName {
+ get {
+ return this.friendlyNameField;
+ }
+ set {
+ this.friendlyNameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(IDPSSODescriptorType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(SPSSODescriptorType))]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ public abstract partial class SSODescriptorType : RoleDescriptorType {
+
+ private IndexedEndpointType[] artifactResolutionServiceField;
+
+ private SingleLogoutServiceType[] singleLogoutServiceField;
+
+ private EndpointType[] manageNameIDServiceField;
+
+ private string nameIDFormatField;
+
+ public SSODescriptorType() {
+ this.nameIDFormatField = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient";
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ArtifactResolutionService")]
+ public IndexedEndpointType[] ArtifactResolutionService {
+ get {
+ return this.artifactResolutionServiceField;
+ }
+ set {
+ this.artifactResolutionServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("SingleLogoutService")]
+ public SingleLogoutServiceType[] SingleLogoutService {
+ get {
+ return this.singleLogoutServiceField;
+ }
+ set {
+ this.singleLogoutServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ManageNameIDService")]
+ public EndpointType[] ManageNameIDService {
+ get {
+ return this.manageNameIDServiceField;
+ }
+ set {
+ this.manageNameIDServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="anyURI")]
+ public string NameIDFormat {
+ get {
+ return this.nameIDFormatField;
+ }
+ set {
+ this.nameIDFormatField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("SingleLogoutService", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class SingleLogoutServiceType {
+
+ private System.Xml.XmlElement[] anyField;
+
+ private SingleLogoutServiceBindingType bindingField;
+
+ private string locationField;
+
+ private string responseLocationField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public SingleLogoutServiceBindingType Binding {
+ get {
+ return this.bindingField;
+ }
+ set {
+ this.bindingField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Location {
+ get {
+ return this.locationField;
+ }
+ set {
+ this.locationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string ResponseLocation {
+ get {
+ return this.responseLocationField;
+ }
+ set {
+ this.responseLocationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://www.cartaidentita.interno.gov.it/saml-extensions")]
+ public enum SingleLogoutServiceBindingType {
+
+ ///
+ [System.Xml.Serialization.XmlEnumAttribute("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST")]
+ urnoasisnamestcSAML20bindingsHTTPPOST,
+
+ ///
+ [System.Xml.Serialization.XmlEnumAttribute("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect")]
+ urnoasisnamestcSAML20bindingsHTTPRedirect,
+
+ ///
+ [System.Xml.Serialization.XmlEnumAttribute("urn:oasis:names:tc:SAML:2.0:bindings:SOAP")]
+ urnoasisnamestcSAML20bindingsSOAP,
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(AttributeAuthorityDescriptorType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(PDPDescriptorType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(AuthnAuthorityDescriptorType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(SSODescriptorType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(IDPSSODescriptorType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(SPSSODescriptorType))]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("RoleDescriptor", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public abstract partial class RoleDescriptorType {
+
+ private SignatureType signatureField;
+
+ private ExtensionsType extensionsField;
+
+ private KeyDescriptorType[] keyDescriptorField;
+
+ private OrganizationType organizationField;
+
+ private ContactType[] contactPersonField;
+
+ private string idField;
+
+ private System.DateTime validUntilField;
+
+ private bool validUntilFieldSpecified;
+
+ private string cacheDurationField;
+
+ private string[] protocolSupportEnumerationField;
+
+ private string errorURLField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ public RoleDescriptorType() {
+ this.protocolSupportEnumerationField = new string[] {
+ "urn:oasis:names:tc:SAML:2.0:protocol"};
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ public SignatureType Signature {
+ get {
+ return this.signatureField;
+ }
+ set {
+ this.signatureField = value;
+ }
+ }
+
+ ///
+ public ExtensionsType Extensions {
+ get {
+ return this.extensionsField;
+ }
+ set {
+ this.extensionsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("KeyDescriptor")]
+ public KeyDescriptorType[] KeyDescriptor {
+ get {
+ return this.keyDescriptorField;
+ }
+ set {
+ this.keyDescriptorField = value;
+ }
+ }
+
+ ///
+ public OrganizationType Organization {
+ get {
+ return this.organizationField;
+ }
+ set {
+ this.organizationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ContactPerson")]
+ public ContactType[] ContactPerson {
+ get {
+ return this.contactPersonField;
+ }
+ set {
+ this.contactPersonField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string ID {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public System.DateTime validUntil {
+ get {
+ return this.validUntilField;
+ }
+ set {
+ this.validUntilField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool validUntilSpecified {
+ get {
+ return this.validUntilFieldSpecified;
+ }
+ set {
+ this.validUntilFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="duration")]
+ public string cacheDuration {
+ get {
+ return this.cacheDurationField;
+ }
+ set {
+ this.cacheDurationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string[] protocolSupportEnumeration {
+ get {
+ return this.protocolSupportEnumerationField;
+ }
+ set {
+ this.protocolSupportEnumerationField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string errorURL {
+ get {
+ return this.errorURLField;
+ }
+ set {
+ this.errorURLField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("Organization", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class OrganizationType {
+
+ private ExtensionsType extensionsField;
+
+ private localizedNameType[] organizationNameField;
+
+ private localizedNameType[] organizationDisplayNameField;
+
+ private localizedURIType[] organizationURLField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ public ExtensionsType Extensions {
+ get {
+ return this.extensionsField;
+ }
+ set {
+ this.extensionsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("OrganizationName")]
+ public localizedNameType[] OrganizationName {
+ get {
+ return this.organizationNameField;
+ }
+ set {
+ this.organizationNameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("OrganizationDisplayName")]
+ public localizedNameType[] OrganizationDisplayName {
+ get {
+ return this.organizationDisplayNameField;
+ }
+ set {
+ this.organizationDisplayNameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("OrganizationURL")]
+ public localizedURIType[] OrganizationURL {
+ get {
+ return this.organizationURLField;
+ }
+ set {
+ this.organizationURLField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("OrganizationURL", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class localizedURIType {
+
+ private string langField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://www.w3.org/XML/1998/namespace")]
+ public string lang {
+ get {
+ return this.langField;
+ }
+ set {
+ this.langField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("ContactPerson", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class ContactType {
+
+ private ContactPersonSPExtensionType extensionsField;
+
+ private string companyField;
+
+ private string[] emailAddressField;
+
+ private string[] telephoneNumberField;
+
+ private ContactTypeType contactTypeField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ public ContactPersonSPExtensionType Extensions {
+ get {
+ return this.extensionsField;
+ }
+ set {
+ this.extensionsField = value;
+ }
+ }
+
+ ///
+ public string Company {
+ get {
+ return this.companyField;
+ }
+ set {
+ this.companyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("EmailAddress", DataType="anyURI")]
+ public string[] EmailAddress {
+ get {
+ return this.emailAddressField;
+ }
+ set {
+ this.emailAddressField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("TelephoneNumber")]
+ public string[] TelephoneNumber {
+ get {
+ return this.telephoneNumberField;
+ }
+ set {
+ this.telephoneNumberField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public ContactTypeType contactType {
+ get {
+ return this.contactTypeField;
+ }
+ set {
+ this.contactTypeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://www.cartaidentita.interno.gov.it/saml-extensions")]
+ public partial class ContactPersonSPExtensionType {
+
+ private object[] itemsField;
+
+ private ItemsChoiceType7[] itemsElementNameField;
+
+ private string municipalityField;
+
+ private string provinceField;
+
+ private string countryField;
+
+ private System.Xml.XmlElement[] anyField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("FiscalCode", typeof(string))]
+ [System.Xml.Serialization.XmlElementAttribute("IPACategory", typeof(string))]
+ [System.Xml.Serialization.XmlElementAttribute("IPACode", typeof(string))]
+ [System.Xml.Serialization.XmlElementAttribute("NACE2Code", typeof(string))]
+ [System.Xml.Serialization.XmlElementAttribute("Private", typeof(object))]
+ [System.Xml.Serialization.XmlElementAttribute("Public", typeof(object))]
+ [System.Xml.Serialization.XmlElementAttribute("VATNumber", typeof(string))]
+ [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public ItemsChoiceType7[] ItemsElementName {
+ get {
+ return this.itemsElementNameField;
+ }
+ set {
+ this.itemsElementNameField = value;
+ }
+ }
+
+ ///
+ public string Municipality {
+ get {
+ return this.municipalityField;
+ }
+ set {
+ this.municipalityField = value;
+ }
+ }
+
+ ///
+ public string Province {
+ get {
+ return this.provinceField;
+ }
+ set {
+ this.provinceField = value;
+ }
+ }
+
+ ///
+ public string Country {
+ get {
+ return this.countryField;
+ }
+ set {
+ this.countryField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://www.cartaidentita.interno.gov.it/saml-extensions", IncludeInSchema=false)]
+ public enum ItemsChoiceType7 {
+
+ ///
+ FiscalCode,
+
+ ///
+ IPACategory,
+
+ ///
+ IPACode,
+
+ ///
+ NACE2Code,
+
+ ///
+ Private,
+
+ ///
+ Public,
+
+ ///
+ VATNumber,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ public enum ContactTypeType {
+
+ ///
+ technical,
+
+ ///
+ administrative,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("AttributeAuthorityDescriptor", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class AttributeAuthorityDescriptorType : RoleDescriptorType {
+
+ private EndpointType[] attributeServiceField;
+
+ private EndpointType[] assertionIDRequestServiceField;
+
+ private string[] nameIDFormatField;
+
+ private string[] attributeProfileField;
+
+ private AttributeType[] attributeField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AttributeService")]
+ public EndpointType[] AttributeService {
+ get {
+ return this.attributeServiceField;
+ }
+ set {
+ this.attributeServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AssertionIDRequestService")]
+ public EndpointType[] AssertionIDRequestService {
+ get {
+ return this.assertionIDRequestServiceField;
+ }
+ set {
+ this.assertionIDRequestServiceField = value;
+ }
+ }
+
+ ///
+ // CODEGEN Warning: 'fixed' attribute on array-like elements is not supported in this version of the .Net Framework. Ignoring fixed='urn:oasis:names:tc:SAML:2.0:nameid-format:transient' attribute on element name='NameIDFormat'.
+ [System.Xml.Serialization.XmlElementAttribute("NameIDFormat", DataType="anyURI")]
+ public string[] NameIDFormat {
+ get {
+ return this.nameIDFormatField;
+ }
+ set {
+ this.nameIDFormatField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AttributeProfile", DataType="anyURI")]
+ public string[] AttributeProfile {
+ get {
+ return this.attributeProfileField;
+ }
+ set {
+ this.attributeProfileField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Attribute", Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ public AttributeType[] Attribute {
+ get {
+ return this.attributeField;
+ }
+ set {
+ this.attributeField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("PDPDescriptor", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class PDPDescriptorType : RoleDescriptorType {
+
+ private EndpointType[] authzServiceField;
+
+ private EndpointType[] assertionIDRequestServiceField;
+
+ private string[] nameIDFormatField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AuthzService")]
+ public EndpointType[] AuthzService {
+ get {
+ return this.authzServiceField;
+ }
+ set {
+ this.authzServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AssertionIDRequestService")]
+ public EndpointType[] AssertionIDRequestService {
+ get {
+ return this.assertionIDRequestServiceField;
+ }
+ set {
+ this.assertionIDRequestServiceField = value;
+ }
+ }
+
+ ///
+ // CODEGEN Warning: 'fixed' attribute on array-like elements is not supported in this version of the .Net Framework. Ignoring fixed='urn:oasis:names:tc:SAML:2.0:nameid-format:transient' attribute on element name='NameIDFormat'.
+ [System.Xml.Serialization.XmlElementAttribute("NameIDFormat", DataType="anyURI")]
+ public string[] NameIDFormat {
+ get {
+ return this.nameIDFormatField;
+ }
+ set {
+ this.nameIDFormatField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("AuthnAuthorityDescriptor", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class AuthnAuthorityDescriptorType : RoleDescriptorType {
+
+ private EndpointType[] authnQueryServiceField;
+
+ private EndpointType[] assertionIDRequestServiceField;
+
+ private string[] nameIDFormatField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AuthnQueryService")]
+ public EndpointType[] AuthnQueryService {
+ get {
+ return this.authnQueryServiceField;
+ }
+ set {
+ this.authnQueryServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AssertionIDRequestService")]
+ public EndpointType[] AssertionIDRequestService {
+ get {
+ return this.assertionIDRequestServiceField;
+ }
+ set {
+ this.assertionIDRequestServiceField = value;
+ }
+ }
+
+ ///
+ // CODEGEN Warning: 'fixed' attribute on array-like elements is not supported in this version of the .Net Framework. Ignoring fixed='urn:oasis:names:tc:SAML:2.0:nameid-format:transient' attribute on element name='NameIDFormat'.
+ [System.Xml.Serialization.XmlElementAttribute("NameIDFormat", DataType="anyURI")]
+ public string[] NameIDFormat {
+ get {
+ return this.nameIDFormatField;
+ }
+ set {
+ this.nameIDFormatField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("IDPSSODescriptor", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class IDPSSODescriptorType : SSODescriptorType {
+
+ private EndpointType[] singleSignOnServiceField;
+
+ private EndpointType[] nameIDMappingServiceField;
+
+ private EndpointType[] assertionIDRequestServiceField;
+
+ private string[] attributeProfileField;
+
+ private AttributeType[] attributeField;
+
+ private bool wantAuthnRequestsSignedField;
+
+ private bool wantAuthnRequestsSignedFieldSpecified;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("SingleSignOnService")]
+ public EndpointType[] SingleSignOnService {
+ get {
+ return this.singleSignOnServiceField;
+ }
+ set {
+ this.singleSignOnServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("NameIDMappingService")]
+ public EndpointType[] NameIDMappingService {
+ get {
+ return this.nameIDMappingServiceField;
+ }
+ set {
+ this.nameIDMappingServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AssertionIDRequestService")]
+ public EndpointType[] AssertionIDRequestService {
+ get {
+ return this.assertionIDRequestServiceField;
+ }
+ set {
+ this.assertionIDRequestServiceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AttributeProfile", DataType="anyURI")]
+ public string[] AttributeProfile {
+ get {
+ return this.attributeProfileField;
+ }
+ set {
+ this.attributeProfileField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Attribute", Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ public AttributeType[] Attribute {
+ get {
+ return this.attributeField;
+ }
+ set {
+ this.attributeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public bool WantAuthnRequestsSigned {
+ get {
+ return this.wantAuthnRequestsSignedField;
+ }
+ set {
+ this.wantAuthnRequestsSignedField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool WantAuthnRequestsSignedSpecified {
+ get {
+ return this.wantAuthnRequestsSignedFieldSpecified;
+ }
+ set {
+ this.wantAuthnRequestsSignedFieldSpecified = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:metadata")]
+ [System.Xml.Serialization.XmlRootAttribute("AdditionalMetadataLocation", Namespace="urn:oasis:names:tc:SAML:2.0:metadata", IsNullable=false)]
+ public partial class AdditionalMetadataLocationType {
+
+ private string namespaceField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string @namespace {
+ get {
+ return this.namespaceField;
+ }
+ set {
+ this.namespaceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("Evidence", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class EvidenceType {
+
+ private object[] itemsField;
+
+ private ItemsChoiceType6[] itemsElementNameField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Assertion", typeof(AssertionType))]
+ [System.Xml.Serialization.XmlElementAttribute("AssertionIDRef", typeof(string), DataType="NCName")]
+ [System.Xml.Serialization.XmlElementAttribute("AssertionURIRef", typeof(string), DataType="anyURI")]
+ [System.Xml.Serialization.XmlElementAttribute("EncryptedAssertion", typeof(EncryptedElementType))]
+ [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public ItemsChoiceType6[] ItemsElementName {
+ get {
+ return this.itemsElementNameField;
+ }
+ set {
+ this.itemsElementNameField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("Assertion", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class AssertionType {
+
+ private NameIDType issuerField;
+
+ private SignatureType signatureField;
+
+ private SubjectType subjectField;
+
+ private ConditionsType conditionsField;
+
+ private AdviceType adviceField;
+
+ private StatementAbstractType[] itemsField;
+
+ private string versionField;
+
+ private string idField;
+
+ private System.DateTime issueInstantField;
+
+ ///
+ public NameIDType Issuer {
+ get {
+ return this.issuerField;
+ }
+ set {
+ this.issuerField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ public SignatureType Signature {
+ get {
+ return this.signatureField;
+ }
+ set {
+ this.signatureField = value;
+ }
+ }
+
+ ///
+ public SubjectType Subject {
+ get {
+ return this.subjectField;
+ }
+ set {
+ this.subjectField = value;
+ }
+ }
+
+ ///
+ public ConditionsType Conditions {
+ get {
+ return this.conditionsField;
+ }
+ set {
+ this.conditionsField = value;
+ }
+ }
+
+ ///
+ public AdviceType Advice {
+ get {
+ return this.adviceField;
+ }
+ set {
+ this.adviceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AttributeStatement", typeof(AttributeStatementType))]
+ [System.Xml.Serialization.XmlElementAttribute("AuthnStatement", typeof(AuthnStatementType))]
+ [System.Xml.Serialization.XmlElementAttribute("AuthzDecisionStatement", typeof(AuthzDecisionStatementType))]
+ [System.Xml.Serialization.XmlElementAttribute("Statement", typeof(StatementAbstractType))]
+ public StatementAbstractType[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string Version {
+ get {
+ return this.versionField;
+ }
+ set {
+ this.versionField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string ID {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public System.DateTime IssueInstant {
+ get {
+ return this.issueInstantField;
+ }
+ set {
+ this.issueInstantField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("NameID", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class NameIDType {
+
+ private string nameQualifierField;
+
+ private string sPNameQualifierField;
+
+ private string formatField;
+
+ private string sPProvidedIDField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string NameQualifier {
+ get {
+ return this.nameQualifierField;
+ }
+ set {
+ this.nameQualifierField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string SPNameQualifier {
+ get {
+ return this.sPNameQualifierField;
+ }
+ set {
+ this.sPNameQualifierField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Format {
+ get {
+ return this.formatField;
+ }
+ set {
+ this.formatField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string SPProvidedID {
+ get {
+ return this.sPProvidedIDField;
+ }
+ set {
+ this.sPProvidedIDField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("Subject", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class SubjectType {
+
+ private object[] itemsField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("BaseID", typeof(BaseIDAbstractType))]
+ [System.Xml.Serialization.XmlElementAttribute("EncryptedID", typeof(EncryptedElementType))]
+ [System.Xml.Serialization.XmlElementAttribute("NameID", typeof(NameIDType))]
+ [System.Xml.Serialization.XmlElementAttribute("SubjectConfirmation", typeof(SubjectConfirmationType))]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("BaseID", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public abstract partial class BaseIDAbstractType {
+
+ private string nameQualifierField;
+
+ private string sPNameQualifierField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string NameQualifier {
+ get {
+ return this.nameQualifierField;
+ }
+ set {
+ this.nameQualifierField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string SPNameQualifier {
+ get {
+ return this.sPNameQualifierField;
+ }
+ set {
+ this.sPNameQualifierField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("EncryptedID", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class EncryptedElementType {
+
+ private EncryptedDataType encryptedDataField;
+
+ private EncryptedKeyType[] encryptedKeyField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ public EncryptedDataType EncryptedData {
+ get {
+ return this.encryptedDataField;
+ }
+ set {
+ this.encryptedDataField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("EncryptedKey", Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ public EncryptedKeyType[] EncryptedKey {
+ get {
+ return this.encryptedKeyField;
+ }
+ set {
+ this.encryptedKeyField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ [System.Xml.Serialization.XmlRootAttribute("EncryptedData", Namespace="http://www.w3.org/2001/04/xmlenc#", IsNullable=false)]
+ public partial class EncryptedDataType : EncryptedType {
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(EncryptedKeyType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(EncryptedDataType))]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ public abstract partial class EncryptedType {
+
+ private EncryptionMethodType encryptionMethodField;
+
+ private KeyInfoType keyInfoField;
+
+ private CipherDataType cipherDataField;
+
+ private EncryptionPropertiesType encryptionPropertiesField;
+
+ private string idField;
+
+ private string typeField;
+
+ private string mimeTypeField;
+
+ private string encodingField;
+
+ ///
+ public EncryptionMethodType EncryptionMethod {
+ get {
+ return this.encryptionMethodField;
+ }
+ set {
+ this.encryptionMethodField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ public KeyInfoType KeyInfo {
+ get {
+ return this.keyInfoField;
+ }
+ set {
+ this.keyInfoField = value;
+ }
+ }
+
+ ///
+ public CipherDataType CipherData {
+ get {
+ return this.cipherDataField;
+ }
+ set {
+ this.cipherDataField = value;
+ }
+ }
+
+ ///
+ public EncryptionPropertiesType EncryptionProperties {
+ get {
+ return this.encryptionPropertiesField;
+ }
+ set {
+ this.encryptionPropertiesField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Type {
+ get {
+ return this.typeField;
+ }
+ set {
+ this.typeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string MimeType {
+ get {
+ return this.mimeTypeField;
+ }
+ set {
+ this.mimeTypeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Encoding {
+ get {
+ return this.encodingField;
+ }
+ set {
+ this.encodingField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ [System.Xml.Serialization.XmlRootAttribute("CipherData", Namespace="http://www.w3.org/2001/04/xmlenc#", IsNullable=false)]
+ public partial class CipherDataType {
+
+ private object itemField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("CipherReference", typeof(CipherReferenceType))]
+ [System.Xml.Serialization.XmlElementAttribute("CipherValue", typeof(byte[]), DataType="base64Binary")]
+ public object Item {
+ get {
+ return this.itemField;
+ }
+ set {
+ this.itemField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ [System.Xml.Serialization.XmlRootAttribute("CipherReference", Namespace="http://www.w3.org/2001/04/xmlenc#", IsNullable=false)]
+ public partial class CipherReferenceType {
+
+ private TransformsType1 itemField;
+
+ private string uRIField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Transforms")]
+ public TransformsType1 Item {
+ get {
+ return this.itemField;
+ }
+ set {
+ this.itemField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string URI {
+ get {
+ return this.uRIField;
+ }
+ set {
+ this.uRIField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(TypeName="TransformsType", Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ public partial class TransformsType1 {
+
+ private TransformType[] transformField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Transform", Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ public TransformType[] Transform {
+ get {
+ return this.transformField;
+ }
+ set {
+ this.transformField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ [System.Xml.Serialization.XmlRootAttribute("EncryptionProperties", Namespace="http://www.w3.org/2001/04/xmlenc#", IsNullable=false)]
+ public partial class EncryptionPropertiesType {
+
+ private EncryptionPropertyType[] encryptionPropertyField;
+
+ private string idField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("EncryptionProperty")]
+ public EncryptionPropertyType[] EncryptionProperty {
+ get {
+ return this.encryptionPropertyField;
+ }
+ set {
+ this.encryptionPropertyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ [System.Xml.Serialization.XmlRootAttribute("EncryptionProperty", Namespace="http://www.w3.org/2001/04/xmlenc#", IsNullable=false)]
+ public partial class EncryptionPropertyType {
+
+ private System.Xml.XmlElement[] itemsField;
+
+ private string[] textField;
+
+ private string targetField;
+
+ private string idField;
+
+ private System.Xml.XmlAttribute[] anyAttrField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string[] Text {
+ get {
+ return this.textField;
+ }
+ set {
+ this.textField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Target {
+ get {
+ return this.targetField;
+ }
+ set {
+ this.targetField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAnyAttributeAttribute()]
+ public System.Xml.XmlAttribute[] AnyAttr {
+ get {
+ return this.anyAttrField;
+ }
+ set {
+ this.anyAttrField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ [System.Xml.Serialization.XmlRootAttribute("EncryptedKey", Namespace="http://www.w3.org/2001/04/xmlenc#", IsNullable=false)]
+ public partial class EncryptedKeyType : EncryptedType {
+
+ private ReferenceList referenceListField;
+
+ private string carriedKeyNameField;
+
+ private string recipientField;
+
+ ///
+ public ReferenceList ReferenceList {
+ get {
+ return this.referenceListField;
+ }
+ set {
+ this.referenceListField = value;
+ }
+ }
+
+ ///
+ public string CarriedKeyName {
+ get {
+ return this.carriedKeyNameField;
+ }
+ set {
+ this.carriedKeyNameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string Recipient {
+ get {
+ return this.recipientField;
+ }
+ set {
+ this.recipientField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ [System.Xml.Serialization.XmlRootAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#", IsNullable=false)]
+ public partial class ReferenceList {
+
+ private ReferenceType1[] itemsField;
+
+ private ItemsChoiceType3[] itemsElementNameField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("DataReference", typeof(ReferenceType1))]
+ [System.Xml.Serialization.XmlElementAttribute("KeyReference", typeof(ReferenceType1))]
+ [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]
+ public ReferenceType1[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public ItemsChoiceType3[] ItemsElementName {
+ get {
+ return this.itemsElementNameField;
+ }
+ set {
+ this.itemsElementNameField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(TypeName="ReferenceType", Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ public partial class ReferenceType1 {
+
+ private System.Xml.XmlElement[] anyField;
+
+ private string uRIField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string URI {
+ get {
+ return this.uRIField;
+ }
+ set {
+ this.uRIField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#", IncludeInSchema=false)]
+ public enum ItemsChoiceType3 {
+
+ ///
+ DataReference,
+
+ ///
+ KeyReference,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("SubjectConfirmation", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class SubjectConfirmationType {
+
+ private object itemField;
+
+ private SubjectConfirmationDataType subjectConfirmationDataField;
+
+ private string methodField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("BaseID", typeof(BaseIDAbstractType))]
+ [System.Xml.Serialization.XmlElementAttribute("EncryptedID", typeof(EncryptedElementType))]
+ [System.Xml.Serialization.XmlElementAttribute("NameID", typeof(NameIDType))]
+ public object Item {
+ get {
+ return this.itemField;
+ }
+ set {
+ this.itemField = value;
+ }
+ }
+
+ ///
+ public SubjectConfirmationDataType SubjectConfirmationData {
+ get {
+ return this.subjectConfirmationDataField;
+ }
+ set {
+ this.subjectConfirmationDataField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Method {
+ get {
+ return this.methodField;
+ }
+ set {
+ this.methodField = value;
+ }
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(KeyInfoConfirmationDataType))]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("SubjectConfirmationData", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class SubjectConfirmationDataType {
+
+ private string[] textField;
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string[] Text {
+ get {
+ return this.textField;
+ }
+ set {
+ this.textField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ public partial class KeyInfoConfirmationDataType : SubjectConfirmationDataType {
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("Conditions", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class ConditionsType {
+
+ private ConditionAbstractType[] itemsField;
+
+ private System.DateTime notBeforeField;
+
+ private bool notBeforeFieldSpecified;
+
+ private System.DateTime notOnOrAfterField;
+
+ private bool notOnOrAfterFieldSpecified;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AudienceRestriction", typeof(AudienceRestrictionType))]
+ [System.Xml.Serialization.XmlElementAttribute("Condition", typeof(ConditionAbstractType))]
+ [System.Xml.Serialization.XmlElementAttribute("OneTimeUse", typeof(OneTimeUseType))]
+ [System.Xml.Serialization.XmlElementAttribute("ProxyRestriction", typeof(ProxyRestrictionType))]
+ public ConditionAbstractType[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public System.DateTime NotBefore {
+ get {
+ return this.notBeforeField;
+ }
+ set {
+ this.notBeforeField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool NotBeforeSpecified {
+ get {
+ return this.notBeforeFieldSpecified;
+ }
+ set {
+ this.notBeforeFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public System.DateTime NotOnOrAfter {
+ get {
+ return this.notOnOrAfterField;
+ }
+ set {
+ this.notOnOrAfterField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool NotOnOrAfterSpecified {
+ get {
+ return this.notOnOrAfterFieldSpecified;
+ }
+ set {
+ this.notOnOrAfterFieldSpecified = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("AudienceRestriction", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class AudienceRestrictionType : ConditionAbstractType {
+
+ private string[] audienceField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Audience", DataType="anyURI")]
+ public string[] Audience {
+ get {
+ return this.audienceField;
+ }
+ set {
+ this.audienceField = value;
+ }
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProxyRestrictionType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(OneTimeUseType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(AudienceRestrictionType))]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("Condition", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public abstract partial class ConditionAbstractType {
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("ProxyRestriction", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class ProxyRestrictionType : ConditionAbstractType {
+
+ private string[] audienceField;
+
+ private string countField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Audience", DataType="anyURI")]
+ public string[] Audience {
+ get {
+ return this.audienceField;
+ }
+ set {
+ this.audienceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="nonNegativeInteger")]
+ public string Count {
+ get {
+ return this.countField;
+ }
+ set {
+ this.countField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("OneTimeUse", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class OneTimeUseType : ConditionAbstractType {
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("Advice", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class AdviceType {
+
+ private object[] itemsField;
+
+ private ItemsChoiceType4[] itemsElementNameField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ [System.Xml.Serialization.XmlElementAttribute("Assertion", typeof(AssertionType))]
+ [System.Xml.Serialization.XmlElementAttribute("AssertionIDRef", typeof(string), DataType="NCName")]
+ [System.Xml.Serialization.XmlElementAttribute("AssertionURIRef", typeof(string), DataType="anyURI")]
+ [System.Xml.Serialization.XmlElementAttribute("EncryptedAssertion", typeof(EncryptedElementType))]
+ [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public ItemsChoiceType4[] ItemsElementName {
+ get {
+ return this.itemsElementNameField;
+ }
+ set {
+ this.itemsElementNameField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IncludeInSchema=false)]
+ public enum ItemsChoiceType4 {
+
+ ///
+ [System.Xml.Serialization.XmlEnumAttribute("##any:")]
+ Item,
+
+ ///
+ Assertion,
+
+ ///
+ AssertionIDRef,
+
+ ///
+ AssertionURIRef,
+
+ ///
+ EncryptedAssertion,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("AttributeStatement", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class AttributeStatementType : StatementAbstractType {
+
+ private object[] itemsField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Attribute", typeof(AttributeType))]
+ [System.Xml.Serialization.XmlElementAttribute("EncryptedAttribute", typeof(EncryptedElementType))]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(AttributeStatementType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(AuthzDecisionStatementType))]
+ [System.Xml.Serialization.XmlIncludeAttribute(typeof(AuthnStatementType))]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("Statement", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public abstract partial class StatementAbstractType {
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("AuthzDecisionStatement", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class AuthzDecisionStatementType : StatementAbstractType {
+
+ private ActionType[] actionField;
+
+ private EvidenceType evidenceField;
+
+ private string resourceField;
+
+ private DecisionType decisionField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Action")]
+ public ActionType[] Action {
+ get {
+ return this.actionField;
+ }
+ set {
+ this.actionField = value;
+ }
+ }
+
+ ///
+ public EvidenceType Evidence {
+ get {
+ return this.evidenceField;
+ }
+ set {
+ this.evidenceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Resource {
+ get {
+ return this.resourceField;
+ }
+ set {
+ this.resourceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public DecisionType Decision {
+ get {
+ return this.decisionField;
+ }
+ set {
+ this.decisionField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("Action", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class ActionType {
+
+ private string namespaceField;
+
+ private string valueField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Namespace {
+ get {
+ return this.namespaceField;
+ }
+ set {
+ this.namespaceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string Value {
+ get {
+ return this.valueField;
+ }
+ set {
+ this.valueField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ public enum DecisionType {
+
+ ///
+ Permit,
+
+ ///
+ Deny,
+
+ ///
+ Indeterminate,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("AuthnStatement", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class AuthnStatementType : StatementAbstractType {
+
+ private SubjectLocalityType subjectLocalityField;
+
+ private AuthnContextType authnContextField;
+
+ private System.DateTime authnInstantField;
+
+ private string sessionIndexField;
+
+ private System.DateTime sessionNotOnOrAfterField;
+
+ private bool sessionNotOnOrAfterFieldSpecified;
+
+ ///
+ public SubjectLocalityType SubjectLocality {
+ get {
+ return this.subjectLocalityField;
+ }
+ set {
+ this.subjectLocalityField = value;
+ }
+ }
+
+ ///
+ public AuthnContextType AuthnContext {
+ get {
+ return this.authnContextField;
+ }
+ set {
+ this.authnContextField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public System.DateTime AuthnInstant {
+ get {
+ return this.authnInstantField;
+ }
+ set {
+ this.authnInstantField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string SessionIndex {
+ get {
+ return this.sessionIndexField;
+ }
+ set {
+ this.sessionIndexField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public System.DateTime SessionNotOnOrAfter {
+ get {
+ return this.sessionNotOnOrAfterField;
+ }
+ set {
+ this.sessionNotOnOrAfterField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool SessionNotOnOrAfterSpecified {
+ get {
+ return this.sessionNotOnOrAfterFieldSpecified;
+ }
+ set {
+ this.sessionNotOnOrAfterFieldSpecified = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("SubjectLocality", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class SubjectLocalityType {
+
+ private string addressField;
+
+ private string dNSNameField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string Address {
+ get {
+ return this.addressField;
+ }
+ set {
+ this.addressField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string DNSName {
+ get {
+ return this.dNSNameField;
+ }
+ set {
+ this.dNSNameField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion")]
+ [System.Xml.Serialization.XmlRootAttribute("AuthnContext", Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IsNullable=false)]
+ public partial class AuthnContextType {
+
+ private object[] itemsField;
+
+ private ItemsChoiceType5[] itemsElementNameField;
+
+ private string[] authenticatingAuthorityField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AuthnContextClassRef", typeof(string), DataType="anyURI")]
+ [System.Xml.Serialization.XmlElementAttribute("AuthnContextDecl", typeof(object))]
+ [System.Xml.Serialization.XmlElementAttribute("AuthnContextDeclRef", typeof(string), DataType="anyURI")]
+ [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]
+ public object[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public ItemsChoiceType5[] ItemsElementName {
+ get {
+ return this.itemsElementNameField;
+ }
+ set {
+ this.itemsElementNameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("AuthenticatingAuthority", DataType="anyURI")]
+ public string[] AuthenticatingAuthority {
+ get {
+ return this.authenticatingAuthorityField;
+ }
+ set {
+ this.authenticatingAuthorityField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IncludeInSchema=false)]
+ public enum ItemsChoiceType5 {
+
+ ///
+ AuthnContextClassRef,
+
+ ///
+ AuthnContextDecl,
+
+ ///
+ AuthnContextDeclRef,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:SAML:2.0:assertion", IncludeInSchema=false)]
+ public enum ItemsChoiceType6 {
+
+ ///
+ Assertion,
+
+ ///
+ AssertionIDRef,
+
+ ///
+ AssertionURIRef,
+
+ ///
+ EncryptedAssertion,
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ [System.Xml.Serialization.XmlRootAttribute("DHKeyValue", Namespace="http://www.w3.org/2001/04/xmlenc#", IsNullable=false)]
+ public partial class DHKeyValueType {
+
+ private byte[] pField;
+
+ private byte[] qField;
+
+ private byte[] generatorField;
+
+ private byte[] publicField;
+
+ private byte[] seedField;
+
+ private byte[] pgenCounterField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] P {
+ get {
+ return this.pField;
+ }
+ set {
+ this.pField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] Q {
+ get {
+ return this.qField;
+ }
+ set {
+ this.qField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] Generator {
+ get {
+ return this.generatorField;
+ }
+ set {
+ this.generatorField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] Public {
+ get {
+ return this.publicField;
+ }
+ set {
+ this.publicField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] seed {
+ get {
+ return this.seedField;
+ }
+ set {
+ this.seedField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
+ public byte[] pgenCounter {
+ get {
+ return this.pgenCounterField;
+ }
+ set {
+ this.pgenCounterField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/04/xmlenc#")]
+ [System.Xml.Serialization.XmlRootAttribute("AgreementMethod", Namespace="http://www.w3.org/2001/04/xmlenc#", IsNullable=false)]
+ public partial class AgreementMethodType {
+
+ private byte[] kANonceField;
+
+ private System.Xml.XmlNode[] anyField;
+
+ private KeyInfoType originatorKeyInfoField;
+
+ private KeyInfoType recipientKeyInfoField;
+
+ private string algorithmField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("KA-Nonce", DataType="base64Binary")]
+ public byte[] KANonce {
+ get {
+ return this.kANonceField;
+ }
+ set {
+ this.kANonceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlNode[] Any {
+ get {
+ return this.anyField;
+ }
+ set {
+ this.anyField = value;
+ }
+ }
+
+ ///
+ public KeyInfoType OriginatorKeyInfo {
+ get {
+ return this.originatorKeyInfoField;
+ }
+ set {
+ this.originatorKeyInfoField = value;
+ }
+ }
+
+ ///
+ public KeyInfoType RecipientKeyInfo {
+ get {
+ return this.recipientKeyInfoField;
+ }
+ set {
+ this.recipientKeyInfoField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Algorithm {
+ get {
+ return this.algorithmField;
+ }
+ set {
+ this.algorithmField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("SignatureProperty", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class SignaturePropertyType {
+
+ private System.Xml.XmlElement[] itemsField;
+
+ private string[] textField;
+
+ private string targetField;
+
+ private string idField;
+
+ ///
+ [System.Xml.Serialization.XmlAnyElementAttribute()]
+ public System.Xml.XmlElement[] Items {
+ get {
+ return this.itemsField;
+ }
+ set {
+ this.itemsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string[] Text {
+ get {
+ return this.textField;
+ }
+ set {
+ this.textField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")]
+ public string Target {
+ get {
+ return this.targetField;
+ }
+ set {
+ this.targetField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("SignatureProperties", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class SignaturePropertiesType {
+
+ private SignaturePropertyType[] signaturePropertyField;
+
+ private string idField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("SignatureProperty")]
+ public SignaturePropertyType[] SignatureProperty {
+ get {
+ return this.signaturePropertyField;
+ }
+ set {
+ this.signaturePropertyField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("Manifest", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class ManifestType {
+
+ private ReferenceType[] referenceField;
+
+ private string idField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Reference")]
+ public ReferenceType[] Reference {
+ get {
+ return this.referenceField;
+ }
+ set {
+ this.referenceField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute(DataType="ID")]
+ public string Id {
+ get {
+ return this.idField;
+ }
+ set {
+ this.idField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2000/09/xmldsig#")]
+ [System.Xml.Serialization.XmlRootAttribute("Transforms", Namespace="http://www.w3.org/2000/09/xmldsig#", IsNullable=false)]
+ public partial class TransformsType {
+
+ private TransformType[] transformField;
+
+ ///
+ [System.Xml.Serialization.XmlElementAttribute("Transform")]
+ public TransformType[] Transform {
+ get {
+ return this.transformField;
+ }
+ set {
+ this.transformField = value;
+ }
+ }
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/cie.xsd b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/cie.xsd
new file mode 100644
index 0000000..cea39db
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/cie.xsd
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/saml-schema-assertion-2.0.xsd b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/saml-schema-assertion-2.0.xsd
new file mode 100644
index 0000000..d449984
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/saml-schema-assertion-2.0.xsd
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+
+
+ Document identifier: saml-schema-assertion-2.0 Location: http://docs.oasis-open.org/security/saml/v2.0/
+ Revision history: V1.0 (November, 2002): Initial Standard Schema. V1.1 (September, 2003): Updates within the
+ same V1.0 namespace. V2.0 (March, 2005): New assertion schema for SAML V2.0 namespace.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/saml-schema-metadata-2.0.xsd b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/saml-schema-metadata-2.0.xsd
new file mode 100644
index 0000000..2fd8089
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/saml-schema-metadata-2.0.xsd
@@ -0,0 +1,337 @@
+
+
+
+
+
+
+
+
+ Document identifier: saml-schema-metadata-2.0
+ Location: http://docs.oasis-open.org/security/saml/v2.0/
+ Revision history:
+ V2.0 (March, 2005):
+ Schema for SAML metadata, first published in SAML 2.0.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/saml-schema-metadata-sp-cie.xsd b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/saml-schema-metadata-sp-cie.xsd
new file mode 100644
index 0000000..a242cd3
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/saml-schema-metadata-sp-cie.xsd
@@ -0,0 +1,303 @@
+
+
+
+
+
+
+
+
+
+ Document identifier: saml-schema-metadata-2.0
+ Location: http://docs.oasis-open.org/security/saml/v2.0/
+ Revision history:
+ V2.0 (March, 2005):
+ Schema for SAML metadata, first published in SAML 2.0.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/xenc-schema.xsd b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/xenc-schema.xsd
new file mode 100644
index 0000000..3e7d19a
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/xenc-schema.xsd
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/xml.xsd b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/xml.xsd
new file mode 100644
index 0000000..425222f
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/xml.xsd
@@ -0,0 +1,80 @@
+
+
+
+
+
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+
+
+
+
+ This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang or xml:space attributes
+ on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ <schema . . .>
+ . . .
+ <import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ <type . . .>
+ . . .
+ <attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes
+
+
+
+ In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2001/03/xml.xsd.
+ At the date of issue it can also be found at
+ http://www.w3.org/2001/xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself. In other words, if the XML Schema namespace changes, the version
+ of this document at
+ http://www.w3.org/2001/xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2001/03/xml.xsd will not change.
+
+
+
+
+
+ In due course, we should install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values . . .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.
+
+
+
+
+
+
+
+
+
+
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/xmldsig-core-schema.xsd b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/xmldsig-core-schema.xsd
new file mode 100644
index 0000000..b8008a5
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.Authentication/Saml/xsd/xmldsig-core-schema.xsd
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/ServiceProvidersFactory.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/ServiceProvidersFactory.cs
new file mode 100644
index 0000000..ae479d1
--- /dev/null
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/ServiceProvidersFactory.cs
@@ -0,0 +1,160 @@
+using Microsoft.Extensions.Options;
+using CIE.AspNetCore.Authentication.Models;
+using SPIDSS = CIE.AspNetCore.Authentication.Models.ServiceProviders;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using CIE.AspNetCore.Authentication.Models.ServiceProviders;
+
+namespace CIE.AspNetCore.WebApp
+{
+ public class ServiceProvidersFactory : IServiceProvidersFactory
+ {
+ private readonly CieOptions _options;
+
+ public ServiceProvidersFactory(IOptionsMonitor options)
+ {
+ _options = options.CurrentValue;
+ }
+
+ public Task> GetServiceProviders()
+ => Task.FromResult(new List() {
+ new ServiceProviderStandard()
+ {
+ FileName = "metadata.xml",
+ Certificate = _options.Certificate,
+ Id = Guid.NewGuid(),
+ EntityId = _options.EntityId,
+ SingleLogoutServiceLocations = new List() {
+ new SingleLogoutService() {
+ Location = "https://localhost:5001/signout-cie",
+ ProtocolBinding = ProtocolBinding.POST
+ }
+ },
+ AssertionConsumerServices = new System.Collections.Generic.List() {
+ new AssertionConsumerService(){
+ Index = 0,
+ IsDefault = true,
+ Location = "https://localhost:5001/signin-cie",
+ ProtocolBinding = ProtocolBinding.POST
+ },
+ new AssertionConsumerService() {
+ Index = 1,
+ IsDefault = false,
+ Location = "https://localhost:5001/signin-cie",
+ ProtocolBinding = ProtocolBinding.Redirect
+ }
+ },
+ AttributeConsumingServices = new System.Collections.Generic.List() {
+ new AttributeConsumingService() {
+ Index = 0,
+ ServiceDescription = "Service 1 Description",
+ ClaimTypes = new CieClaimTypes[] {
+ CieClaimTypes.Name,
+ CieClaimTypes.FamilyName,
+ CieClaimTypes.FiscalNumber,
+ CieClaimTypes.DateOfBirth
+ }
+ },
+ new AttributeConsumingService() {
+ Index = 1,
+ ServiceDescription = "Service 2 Description",
+ ClaimTypes = new CieClaimTypes[] {
+ CieClaimTypes.Name,
+ CieClaimTypes.FamilyName,
+ CieClaimTypes.FiscalNumber,
+ CieClaimTypes.DateOfBirth
+ }
+ }
+ },
+ OrganizationName = "Organizzazione fittizia per il collaudo",
+ OrganizationDisplayName = "Oganizzazione fittizia per il collaudo",
+ OrganizationURL = "https://www.asfweb.it/",
+ ContactPersons = new System.Collections.Generic.List() {
+ new PublicContactPerson() {
+ ContactType = Authentication.Saml.SP.ContactTypeType.administrative,
+ EmailAddress = new string[] { "esempio_sp_privato@spp.it" },
+ TelephoneNumber = new string[] { "+39061234567" },
+ IPACode = "codiceIPA_SP",
+ IPACategory = "categoriaIPA_SP",
+ NACE2Codes = new string[] { "CODICE_ATECO" },
+ Municipality = "CODICE_ISTAT_SEDE"
+ }
+ }
+ },
+ new ServiceProviderStandard()
+ {
+ FileName = "metadata2.xml",
+ Certificate = _options.Certificate,
+ Id = Guid.NewGuid(),
+ EntityId = _options.EntityId,
+ SingleLogoutServiceLocations = new List() {
+ new SingleLogoutService() {
+ Location = "https://localhost:5001/signout-cie",
+ ProtocolBinding = ProtocolBinding.POST
+ }
+ },
+ AssertionConsumerServices = new System.Collections.Generic.List() {
+ new AssertionConsumerService(){
+ Index = 0,
+ IsDefault = true,
+ Location = "https://localhost:5001/signin-cie",
+ ProtocolBinding = ProtocolBinding.POST
+ },
+ new AssertionConsumerService() {
+ Index = 1,
+ IsDefault = false,
+ Location = "https://localhost:5001/signin-cie",
+ ProtocolBinding = ProtocolBinding.Redirect
+ }
+ },
+ AttributeConsumingServices = new System.Collections.Generic.List() {
+ new AttributeConsumingService() {
+ Index = 0,
+ ServiceDescription = "Service 1 Description",
+ ClaimTypes = new CieClaimTypes[] {
+ CieClaimTypes.Name,
+ CieClaimTypes.FamilyName,
+ CieClaimTypes.FiscalNumber,
+ CieClaimTypes.DateOfBirth
+ }
+ },
+ new AttributeConsumingService() {
+ Index = 1,
+ ServiceDescription = "Service 2 Description",
+ ClaimTypes = new CieClaimTypes[] {
+ CieClaimTypes.Name,
+ CieClaimTypes.FamilyName,
+ CieClaimTypes.FiscalNumber,
+ CieClaimTypes.DateOfBirth
+ }
+ }
+ },
+ OrganizationName = "Organizzazione fittizia per il collaudo",
+ OrganizationDisplayName = "Oganizzazione fittizia per il collaudo",
+ OrganizationURL = "https://www.asfweb.it/",
+ ContactPersons = new System.Collections.Generic.List() {
+ new PublicContactPerson() {
+ ContactType = Authentication.Saml.SP.ContactTypeType.administrative,
+ EmailAddress = new string[] { "esempio_sp_privato@spp.it" },
+ TelephoneNumber = new string[] { "+39061234567" },
+ IPACode = "codiceIPA_SP",
+ IPACategory = "categoriaIPA_SP",
+ NACE2Codes = new string[] { "CODICE_ATECO" },
+ Municipality = "CODICE_ISTAT_SEDE"
+ },
+ new PrivateContactPerson() {
+ ContactType = Authentication.Saml.SP.ContactTypeType.technical,
+ Company = "Partner Tecnologico per Soluzioni di Identità Federata s.r.l.",
+ EmailAddress = new string[] { "info.cie@partnertecnologicoidfederata.com" },
+ TelephoneNumber = new string[] { "+390999135792" },
+ VATNumber = "IT01234567890",
+ FiscalCode = "9876543210",
+ NACE2Codes = new string[] { "CODICE_ATECO" },
+ Municipality = "CODICE_ISTAT_SEDE"
+ }
+ }
+ }
+ });
+ }
+}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/Startup.cs b/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/Startup.cs
index 4c4bd3e..5220688 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/Startup.cs
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/Startup.cs
@@ -1,18 +1,15 @@
+using CIE.AspNetCore.Authentication.Events;
+using CIE.AspNetCore.Authentication.Extensions;
+using CIE.AspNetCore.Authentication.Models;
+using CIE.AspNetCore.Authentication.Models.ServiceProviders;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
-using CIE.AspNetCore.Authentication;
-using CIE.AspNetCore.Authentication.Events;
-using CIE.AspNetCore.Authentication.Helpers;
-using CIE.AspNetCore.Authentication.Models;
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
namespace CIE.AspNetCore.WebApp
@@ -36,10 +33,12 @@ public void ConfigureServices(IServiceCollection services)
o.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
o.DefaultChallengeScheme = CieDefaults.AuthenticationScheme;
})
- .AddCie(Configuration, o => {
- o.Events.OnTokenCreating = async (s) => await s.HttpContext.RequestServices.GetRequiredService().TokenCreating(s);
+ .AddCie(o => {
o.LoadFromConfiguration(Configuration);
+ o.ServiceProviders.AddRange(GetPrivateServiceProviders(o));
+ o.Events.OnTokenCreating = async (s) => await s.HttpContext.RequestServices.GetRequiredService().TokenCreating(s);
})
+ .AddServiceProvidersFactory()
.AddCookie();
services.AddScoped();
}
@@ -64,6 +63,8 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app.UseAuthentication();
app.UseAuthorization();
+ app.AddCieSPMetadataEndpoints();
+
app.UseEndpoints(endpoints => {
endpoints.MapControllerRoute(
name: "default",
@@ -83,5 +84,146 @@ public override Task TokenCreating(SecurityTokenCreatingContext context)
return base.TokenCreating(context);
}
}
+
+ private List GetPrivateServiceProviders(CieOptions o)
+ {
+ return new List(){
+ new ServiceProviderStandard()
+ {
+ FileName = "metadata1.xml",
+ Certificate = o.Certificate,
+ Id = Guid.NewGuid(),
+ EntityId = o.EntityId,
+ SingleLogoutServiceLocations = new List() {
+ new SingleLogoutService() {
+ Location = "https://localhost:5001/signout-cie",
+ ProtocolBinding = ProtocolBinding.POST
+ }
+ },
+ AssertionConsumerServices = new System.Collections.Generic.List() {
+ new AssertionConsumerService(){
+ Index = 0,
+ IsDefault = true,
+ Location = "https://localhost:5001/signin-cie",
+ ProtocolBinding = ProtocolBinding.POST
+ },
+ new AssertionConsumerService() {
+ Index = 1,
+ IsDefault = false,
+ Location = "https://localhost:5001/signin-cie",
+ ProtocolBinding = ProtocolBinding.Redirect
+ }
+ },
+ AttributeConsumingServices = new System.Collections.Generic.List() {
+ new AttributeConsumingService() {
+ Index = 0,
+ ServiceDescription = "Service 1 Description",
+ ClaimTypes = new CieClaimTypes[] {
+ CieClaimTypes.Name,
+ CieClaimTypes.FamilyName,
+ CieClaimTypes.FiscalNumber,
+ CieClaimTypes.DateOfBirth
+ }
+ },
+ new AttributeConsumingService() {
+ Index = 1,
+ ServiceDescription = "Service 2 Description",
+ ClaimTypes = new CieClaimTypes[] {
+ CieClaimTypes.Name,
+ CieClaimTypes.FamilyName,
+ CieClaimTypes.FiscalNumber,
+ CieClaimTypes.DateOfBirth
+ }
+ }
+ },
+ OrganizationName = "Organizzazione fittizia per il collaudo",
+ OrganizationDisplayName = "Oganizzazione fittizia per il collaudo",
+ OrganizationURL = "https://www.asfweb.it/",
+ ContactPersons = new System.Collections.Generic.List() {
+ new PublicContactPerson() {
+ ContactType = Authentication.Saml.SP.ContactTypeType.administrative,
+ Company = "Organizzazione fittizia per il collaudo",
+ EmailAddress = new string[] { "info.cie@partnertecnologicoidfederata.com" },
+ TelephoneNumber = new string[] { "+390999135792" },
+ Municipality = "CODICE_ISTAT_SEDE",
+ IPACode = "ipzsspa"
+ }
+ }
+ },
+ new ServiceProviderStandard()
+ {
+ FileName = "metadata3.xml",
+ Certificate = o.Certificate,
+ Id = Guid.NewGuid(),
+ EntityId = o.EntityId,
+ SingleLogoutServiceLocations = new List() {
+ new SingleLogoutService() {
+ Location = "https://localhost:5001/signout-cie",
+ ProtocolBinding = ProtocolBinding.POST
+ }
+ },
+ AssertionConsumerServices = new System.Collections.Generic.List() {
+ new AssertionConsumerService(){
+ Index = 0,
+ IsDefault = true,
+ Location = "https://localhost:5001/signin-cie",
+ ProtocolBinding = ProtocolBinding.POST
+ },
+ new AssertionConsumerService() {
+ Index = 1,
+ IsDefault = false,
+ Location = "https://localhost:5001/signin-cie",
+ ProtocolBinding = ProtocolBinding.Redirect
+ }
+ },
+ AttributeConsumingServices = new System.Collections.Generic.List() {
+ new AttributeConsumingService() {
+ Index = 0,
+ ServiceDescription = "Service 1 Description",
+ ClaimTypes = new CieClaimTypes[] {
+ CieClaimTypes.Name,
+ CieClaimTypes.FamilyName,
+ CieClaimTypes.FiscalNumber,
+ CieClaimTypes.DateOfBirth
+ }
+ },
+ new AttributeConsumingService() {
+ Index = 1,
+ ServiceDescription = "Service 2 Description",
+ ClaimTypes = new CieClaimTypes[] {
+ CieClaimTypes.Name,
+ CieClaimTypes.FamilyName,
+ CieClaimTypes.FiscalNumber,
+ CieClaimTypes.DateOfBirth
+ }
+ }
+ },
+ OrganizationName = "Organizzazione fittizia per il collaudo",
+ OrganizationDisplayName = "Oganizzazione fittizia per il collaudo",
+ OrganizationURL = "https://www.asfweb.it/",
+ ContactPersons = new System.Collections.Generic.List() {
+ new PrivateContactPerson() {
+ ContactType = Authentication.Saml.SP.ContactTypeType.administrative,
+ EmailAddress = new string[] { "esempio_sp_privato@spp.it" },
+ TelephoneNumber = new string[] { "+39061234567" },
+ VATNumber = "IT01234567890",
+ FiscalCode = "9876543210",
+ NACE2Codes = new string[] { "CODICE_ATECO" },
+ Municipality = "CODICE_ISTAT_SEDE"
+ },
+ new PrivateContactPerson() {
+ ContactType = Authentication.Saml.SP.ContactTypeType.technical,
+ Company = "Partner Tecnologico per Soluzioni di Identità Federata s.r.l.",
+ EmailAddress = new string[] { "info.cie@partnertecnologicoidfederata.com" },
+ TelephoneNumber = new string[] { "+390999135792" },
+ VATNumber = "IT01234567890",
+ FiscalCode = "9876543210",
+ NACE2Codes = new string[] { "CODICE_ATECO" },
+ Municipality = "CODICE_ISTAT_SEDE"
+ }
+ }
+ }
+ };
+ }
}
}
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/appsettings.json b/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/appsettings.json
index 4e831b4..e73914a 100644
--- a/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/appsettings.json
+++ b/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/appsettings.json
@@ -21,7 +21,7 @@
"SecurityLevel": 3
},
"Certificate": {
- "Source": "Raw",
+ "Source": "File",
"Store": {
"Location": "CurrentUser",
"Name": "My",
@@ -30,16 +30,16 @@
"validOnly": false
},
"File": {
- "Path": "xxx.pfx",
- "Password": "xxx"
+ "Path": "wwwroot/cie/ComuneVigata-CIE.pfx",
+ "Password": "P@ssW0rd!"
},
"Raw": {
- "Certificate": "test",
- "Password": "test"
+ "Certificate": "base64",
+ "Password": "password"
}
},
- "EntityId": "https://entityID",
- "AssertionConsumerServiceIndex": 2,
+ "EntityId": "https://entityID/ENTE_TEST",
+ "AssertionConsumerServiceIndex": 0,
"AttributeConsumingServiceIndex": 0
},
"AllowedHosts": "*"
diff --git a/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/wwwroot/cie/ComuneVigata-CIE.pfx b/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/wwwroot/cie/ComuneVigata-CIE.pfx
new file mode 100644
index 0000000..1cf0fde
Binary files /dev/null and b/CIE.AspNetCore.Authentication/CIE.AspNetCore.WebApp/wwwroot/cie/ComuneVigata-CIE.pfx differ
diff --git a/README.md b/README.md
index c894eeb..c60ee9c 100644
--- a/README.md
+++ b/README.md
@@ -161,8 +161,120 @@ public class CustomCieEvents : CieEvents
}
```
+# Generazione Metadata Service Provider
+La libreria è dotata della possibilità di generare dinamicamente dei metadata per Service Provider conformi ai profili privati e pubblici indicati nel **Manuale Tecnico** CIE.
+
+E' possibile aggiungere nuovi ServiceProvider sia in maniera procedurale, in fase di `Startup`, come segue:
+
+```csharp
+.AddCie(o =>
+{
+ o.LoadFromConfiguration(Configuration);
+ o.ServiceProviders.AddRange(GetServiceProviders(o));
+})
+
+......
+
+private List GetServiceProviders(CieOptions o)
+{
+ return new List(){
+ new ServiceProviderStandard()
+ {
+ FileName = "metadata.xml",
+ Certificate = _options.Certificate,
+ Id = Guid.NewGuid(),
+ EntityId = _options.EntityId,
+ SingleLogoutServiceLocations = new List() {
+ new SingleLogoutService() {
+ Location = "https://localhost:5001/signout-cie",
+ ProtocolBinding = ProtocolBinding.POST
+ }
+ },
+ AssertionConsumerServices = new System.Collections.Generic.List() {
+ new AssertionConsumerService(){
+ Index = 0,
+ IsDefault = true,
+ Location = "https://localhost:5001/signin-cie",
+ ProtocolBinding = ProtocolBinding.POST
+ },
+ new AssertionConsumerService() {
+ Index = 1,
+ IsDefault = false,
+ Location = "https://localhost:5001/signin-cie",
+ ProtocolBinding = ProtocolBinding.Redirect
+ }
+ },
+ AttributeConsumingServices = new System.Collections.Generic.List() {
+ new AttributeConsumingService() {
+ Index = 0,
+ ServiceDescription = "Service 1 Description",
+ ClaimTypes = new CieClaimTypes[] {
+ CieClaimTypes.Name,
+ CieClaimTypes.FamilyName,
+ CieClaimTypes.FiscalNumber,
+ CieClaimTypes.DateOfBirth
+ }
+ },
+ new AttributeConsumingService() {
+ Index = 1,
+ ServiceDescription = "Service 2 Description",
+ ClaimTypes = new CieClaimTypes[] {
+ CieClaimTypes.Name,
+ CieClaimTypes.FamilyName,
+ CieClaimTypes.FiscalNumber,
+ CieClaimTypes.DateOfBirth
+ }
+ }
+ },
+ OrganizationName = "Organizzazione fittizia per il collaudo",
+ OrganizationDisplayName = "Oganizzazione fittizia per il collaudo",
+ OrganizationURL = "https://www.asfweb.it/",
+ ContactPersons = new System.Collections.Generic.List() {
+ new PrivateContactPerson() {
+ ContactType = Authentication.Saml.SP.ContactTypeType.administrative,
+ Company = "Partner Tecnologico per Soluzioni di Identità Federata s.r.l.",
+ EmailAddress = new string[] { "info.cie@partnertecnologicoidfederata.com" },
+ TelephoneNumber = new string[] { "+390999135792" },
+ VATNumber = "IT01234567890",
+ FiscalCode = "9876543210",
+ NACE2Codes = new string[] { "CODICE_ATECO" },
+ Municipality = "CODICE_ISTAT_SEDE"
+ }
+ }
+ },
+.......
+```
+sia utilizzando una classe che implementa l'interfaccia `IServiceProvidersFactory` e configurandola come segue:
+
+```csharp
+.AddCie(o =>
+{
+ o.LoadFromConfiguration(Configuration);
+})
+.AddServiceProvidersFactory();
+
+........
+
+public class ServiceProvidersFactory : IServiceProvidersFactory
+{
+ public Task> GetServiceProviders()
+ => Task.FromResult(new List() {
+ new Authentication.Models.ServiceProviders.ServiceProviderStandard()
+ {
+..............
+```
+
+Infine, per poter esporre gli endpoint dei metadata relativi ai Service Provider registrati, sarà necessario aggiungere la seguente riga:
+```csharp
+app.AddCieSPMetadataEndpoints();
+```
+
+Tutti i metadata generati vengono automaticamente esposti su endpoint diversi, che hanno come BasePath `/metadata-cie` (ad esempio, un metadata definito con NomeFile = `metadata.xml` verrà esposto sull'endpoint `/metadata-cie/metadata.xml`): il BasePath può essere cambiato, sovrascrivendo la proprietà `ServiceProvidersMetadataEndpointsBasePath` sulle `CieOptions` nello `Startup.cs`.
+
+All'interno dell'esempio `CIE.AspNetCore.WebApp` è presente un ServiceProvider di esempio per ogni tipologia di profilo, sia configurato in maniera procedurale, sia tramite `IServiceProvidersFactory`.
+
# Error Handling
-La libreria può, in qualunque fase (sia in fase di creazione della Request sia in fase di gestione della Response), sollevare eccezioni.
+La libreria può, in qualunque fase (sia in fase di creazione della Request sia in fase di gestione della Response), sollevare eccezioni.
Un tipico scenario è quello in cui vengono ricevuti i codici di errore previsti dal protocollo (n.19, n.20, ecc....), in tal caso la libreria solleva un'eccezione contenente il corrispondente messaggio d'errore localizzato, richiesto dalle specifiche CIE3.0, che è possibile gestire (ad esempio per la visualizzazione) utilizzando il normale flusso previsto per AspNetCore. L'esempio seguente fa uso del middleware di ExceptionHandling di AspNetCore.
```csharp