forked from Sustainsys/Saml2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Sustainsys#1182 from rpmansion/metadata
Break out Metadata to separate library
- Loading branch information
Showing
217 changed files
with
10,573 additions
and
9,465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System; | ||
|
||
namespace Sustainsys.Saml2.Metadata | ||
{ | ||
public class AdditionalMetadataLocation | ||
{ | ||
public Uri Uri { get; set; } | ||
|
||
public string Namespace { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Sustainsys.Saml2.Metadata | ||
{ | ||
public class CipherData | ||
{ | ||
public string CipherValue { get; set; } | ||
|
||
public CipherReference CipherReference { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Xml; | ||
|
||
namespace Sustainsys.Saml2.Metadata | ||
{ | ||
public class CipherReference | ||
{ | ||
public Uri Uri { get; set; } | ||
|
||
public ICollection<XmlElement> Transforms { get; private set; } = | ||
new Collection<XmlElement>(); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...iguration/ICustomIdentityConfiguration.cs → ...iguration/ICustomIdentityConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Xml; | ||
|
||
namespace Sustainsys.Saml2.Metadata | ||
{ | ||
public class ClaimValue | ||
{ | ||
public string Value { get; set; } | ||
public ICollection<XmlElement> StructuredValue { get; set; } | ||
} | ||
|
||
public class ConstrainedValue | ||
{ | ||
public abstract class Constraint | ||
{ | ||
} | ||
|
||
public class CompareConstraint : Constraint | ||
{ | ||
public enum CompareOperator | ||
{ | ||
Lt, | ||
Lte, | ||
Gt, | ||
Gte, | ||
} | ||
|
||
public CompareOperator CompareOp { get; private set; } | ||
public ClaimValue Value { get; set; } = new ClaimValue(); | ||
|
||
public CompareConstraint(CompareOperator compareOp) | ||
{ | ||
CompareOp = compareOp; | ||
} | ||
} | ||
|
||
public class RangeConstraint : Constraint | ||
{ | ||
public ClaimValue LowerBound { get; set; } = new ClaimValue(); | ||
public ClaimValue UpperBound { get; set; } = new ClaimValue(); | ||
} | ||
|
||
public class ListConstraint : Constraint | ||
{ | ||
public ICollection<ClaimValue> Values { get; private set; } = | ||
new Collection<ClaimValue>(); | ||
} | ||
|
||
public bool AssertConstraint { get; set; } | ||
|
||
public ICollection<Constraint> Constraints { get; private set; } = | ||
new Collection<Constraint>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Xml; | ||
|
||
namespace Sustainsys.Saml2.Metadata | ||
{ | ||
public class ContactPerson | ||
{ | ||
public string Company { get; set; } | ||
|
||
public ICollection<string> EmailAddresses { get; private set; } = | ||
new Collection<string>(); | ||
|
||
public string GivenName { get; set; } | ||
public string Surname { get; set; } | ||
|
||
public ICollection<string> TelephoneNumbers { get; private set; } = | ||
new Collection<string>(); | ||
|
||
public ContactType Type { get; set; } | ||
|
||
public ICollection<XmlElement> Extensions { get; private set; } = | ||
new Collection<XmlElement>(); | ||
|
||
public ContactPerson() | ||
{ | ||
} | ||
|
||
public ContactPerson(ContactType type) | ||
{ | ||
Type = type; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Sustainsys.Saml2.Metadata | ||
{ | ||
public enum ContactType | ||
{ | ||
Unspecified, | ||
Technical, | ||
Support, | ||
Administrative, | ||
Billing, | ||
Other | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Sustainsys.Saml2.Metadata/Descriptors/AffiliationDescriptor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Xml; | ||
|
||
namespace Sustainsys.Saml2.Metadata.Descriptors | ||
{ | ||
public class AffiliationDescriptor : ICachedMetadata | ||
{ | ||
public ICollection<EntityId> AffiliateMembers { get; private set; } = | ||
new Collection<EntityId>(); | ||
|
||
public ICollection<XmlElement> Extensions { get; private set; } = | ||
new Collection<XmlElement>(); | ||
|
||
public ICollection<KeyDescriptor> KeyDescriptors { get; private set; } = | ||
new Collection<KeyDescriptor>(); | ||
|
||
public EntityId AffiliationOwnerId { get; set; } | ||
public DateTime? ValidUntil { get; set; } | ||
public XsdDuration? CacheDuration { get; set; } | ||
public string Id { get; set; } | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
Sustainsys.Saml2.Metadata/Descriptors/ApplicationServiceDescriptor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Sustainsys.Saml2.Metadata.Services; | ||
using System.Collections.Generic; | ||
|
||
namespace Sustainsys.Saml2.Metadata.Descriptors | ||
{ | ||
public class ApplicationServiceDescriptor : WebServiceDescriptor | ||
{ | ||
public ICollection<EndpointReference> Endpoints { get; private set; } = | ||
new List<EndpointReference>(); | ||
|
||
public ICollection<EndpointReference> PassiveRequestorEndpoints { get; private set; } = | ||
new List<EndpointReference>(); | ||
|
||
public ICollection<EndpointReference> SingleSignOutEndpoints { get; private set; } = | ||
new List<EndpointReference>(); | ||
|
||
public ApplicationServiceDescriptor() | ||
{ | ||
} | ||
|
||
public ApplicationServiceDescriptor( | ||
IEnumerable<EndpointReference> endpoints, | ||
IEnumerable<EndpointReference> passiveRequestorEndpoints, | ||
IEnumerable<EndpointReference> singleSignOutEndpoints | ||
) | ||
{ | ||
((List<EndpointReference>)Endpoints).AddRange(endpoints); | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
Sustainsys.Saml2.Metadata/Descriptors/AttributeAuthorityDescriptor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Microsoft.IdentityModel.Tokens.Saml2; | ||
using Sustainsys.Saml2.Metadata.Services; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
|
||
namespace Sustainsys.Saml2.Metadata.Descriptors | ||
{ | ||
#if FALSE | ||
public class SamlAttribute | ||
{ | ||
public string Name { get; set; } | ||
public Uri NameFormat { get; set; } | ||
public string FriendlyName { get; set; } | ||
public string Value { get; set; } | ||
} | ||
#endif | ||
|
||
public class AttributeAuthorityDescriptor : RoleDescriptor | ||
{ | ||
public ICollection<AttributeService> AttributeServices { get; private set; } = | ||
new Collection<AttributeService>(); | ||
|
||
public ICollection<AssertionIdRequestService> AssertionIdRequestServices { get; private set; } = | ||
new Collection<AssertionIdRequestService>(); | ||
|
||
public ICollection<NameIDFormat> NameIDFormats { get; private set; } = | ||
new Collection<NameIDFormat>(); | ||
|
||
public ICollection<AttributeProfile> AttributeProfiles { get; private set; } = | ||
new Collection<AttributeProfile>(); | ||
|
||
public ICollection<Saml2Attribute> Attributes { get; private set; } = | ||
new Collection<Saml2Attribute>(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
Sustainsys.Saml2.Metadata/Descriptors/AuthnAuthorityDescriptor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Sustainsys.Saml2.Metadata.Services; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
|
||
namespace Sustainsys.Saml2.Metadata.Descriptors | ||
{ | ||
public class AuthnAuthorityDescriptor : RoleDescriptor | ||
{ | ||
public ICollection<AuthnQueryService> AuthnQueryServices { get; private set; } = | ||
new Collection<AuthnQueryService>(); | ||
|
||
public ICollection<AssertionIdRequestService> AssertionIdRequestServices { get; private set; } = | ||
new Collection<AssertionIdRequestService>(); | ||
|
||
public ICollection<NameIDFormat> NameIDFormats { get; private set; } = | ||
new Collection<NameIDFormat>(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Sustainsys.Saml2.Metadata/Descriptors/EntitiesDescriptor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Xml; | ||
|
||
namespace Sustainsys.Saml2.Metadata.Descriptors | ||
{ | ||
public class EntitiesDescriptor : MetadataBase, ICachedMetadata | ||
{ | ||
public ICollection<EntityDescriptor> ChildEntities { get; private set; } = | ||
new Collection<EntityDescriptor>(); | ||
|
||
public ICollection<EntitiesDescriptor> ChildEntityGroups { get; private set; } = | ||
new Collection<EntitiesDescriptor>(); | ||
|
||
public Collection<XmlElement> Extensions { get; private set; } = | ||
new Collection<XmlElement>(); | ||
|
||
public string Id { get; set; } | ||
public string Name { get; set; } | ||
public DateTime? ValidUntil { get; set; } | ||
public XsdDuration? CacheDuration { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Xml; | ||
|
||
namespace Sustainsys.Saml2.Metadata.Descriptors | ||
{ | ||
public class EntityDescriptor : MetadataBase, ICachedMetadata | ||
{ | ||
public string Id { get; set; } | ||
|
||
public ICollection<ContactPerson> Contacts { get; private set; } = | ||
new Collection<ContactPerson>(); | ||
|
||
public EntityId EntityId { get; set; } | ||
public string FederationId { get; set; } | ||
public Organization Organization { get; set; } | ||
|
||
public ICollection<RoleDescriptor> RoleDescriptors { get; private set; } = | ||
new Collection<RoleDescriptor>(); | ||
|
||
public XsdDuration? CacheDuration { get; set; } | ||
public DateTime? ValidUntil { get; set; } | ||
|
||
public ICollection<AffiliationDescriptor> AffiliationDescriptors { get; private set; } = | ||
new Collection<AffiliationDescriptor>(); | ||
|
||
public ICollection<AdditionalMetadataLocation> AdditionalMetadataLocations { get; private set; } = | ||
new Collection<AdditionalMetadataLocation>(); | ||
|
||
public Collection<XmlElement> Extensions { get; private set; } = | ||
new Collection<XmlElement>(); | ||
|
||
public EntityDescriptor(EntityId entityId) | ||
{ | ||
EntityId = entityId; | ||
} | ||
|
||
public EntityDescriptor() : | ||
this(null) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Microsoft.IdentityModel.Tokens.Saml2; | ||
using Sustainsys.Saml2.Metadata.Services; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
|
||
namespace Sustainsys.Saml2.Metadata.Descriptors | ||
{ | ||
public class IdpSsoDescriptor : SsoDescriptor | ||
{ | ||
public ICollection<SingleSignOnService> SingleSignOnServices { get; private set; } = | ||
new Collection<SingleSignOnService>(); | ||
|
||
public ICollection<NameIDMappingService> NameIDMappingServices { get; private set; } = | ||
new Collection<NameIDMappingService>(); | ||
|
||
public ICollection<AssertionIdRequestService> AssertionIDRequestServices { get; private set; } = | ||
new Collection<AssertionIdRequestService>(); | ||
|
||
public ICollection<AttributeProfile> AttributeProfiles { get; private set; } = | ||
new Collection<AttributeProfile>(); | ||
|
||
public ICollection<Saml2Attribute> SupportedAttributes { get; private set; } = | ||
new Collection<Saml2Attribute>(); | ||
|
||
public bool? WantAuthnRequestsSigned { get; set; } | ||
} | ||
} |
Oops, something went wrong.