Skip to content

Commit

Permalink
Merge pull request #208 from ITfoxtec/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Revsgaard authored Jun 4, 2024
2 parents a8da2c1 + dc09b98 commit 2c629d0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<PackageTags>SAML SAML 2.0 SAML2.0 SAML2 SAML 2 SAML-P SAMLP SSO Identity Provider (IdP) and Relying Party (RP) Authentication Metadata OIOSAML OIOSAML 2 OIOSAML 3 NemLogin NemLog-in 2 NemLog-in 3 ASP.NET MVC</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageIconUrl>https://itfoxtec.com/favicon.ico</PackageIconUrl>
<AssemblyVersion>4.11.0</AssemblyVersion>
<FileVersion>4.11.0</FileVersion>
<AssemblyVersion>4.11.1</AssemblyVersion>
<FileVersion>4.11.1</FileVersion>
<Copyright>Copyright © 2024</Copyright>
<Version>4.11.0</Version>
<Version>4.11.1</Version>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>ITfoxtec.SAML2.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<PackageTags>SAML SAML 2.0 SAML2.0 SAML2 SAML 2 SAML-P SAMLP SSO Identity Provider (IdP) Relying Party (RP) Authentication Metadata OIOSAML OIOSAML 2 OIOSAML 3 NemLogin NemLog-in 2 NemLog-in 3 ASP.NET MVC Core</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageIconUrl>https://itfoxtec.com/favicon.ico</PackageIconUrl>
<AssemblyVersion>4.11.0</AssemblyVersion>
<FileVersion>4.11.0</FileVersion>
<AssemblyVersion>4.11.1</AssemblyVersion>
<FileVersion>4.11.1</FileVersion>
<Copyright>Copyright © 2024</Copyright>
<Version>4.11.0</Version>
<Version>4.11.1</Version>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>ITfoxtec.SAML2.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
Expand Down
6 changes: 3 additions & 3 deletions src/ITfoxtec.Identity.Saml2/ITfoxtec.Identity.Saml2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<PackageTags>SAML SAML 2.0 SAML2.0 SAML2 SAML 2 SAML-P SAMLP SSO Identity Provider (IdP) Relying Party (RP) Authentication Metadata OIOSAML OIOSAML 2 OIOSAML 3 NemLogin NemLog-in 2 NemLog-in 3</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageIconUrl>https://itfoxtec.com/favicon.ico</PackageIconUrl>
<AssemblyVersion>4.11.0</AssemblyVersion>
<FileVersion>4.11.0</FileVersion>
<AssemblyVersion>4.11.1</AssemblyVersion>
<FileVersion>4.11.1</FileVersion>
<Copyright>Copyright © 2024</Copyright>
<Version>4.11.0</Version>
<Version>4.11.1</Version>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>ITfoxtec.SAML2.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
Expand Down
21 changes: 17 additions & 4 deletions src/ITfoxtec.Identity.Saml2/Schemas/Metadata/LocalizedUriType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,27 @@ namespace ITfoxtec.Identity.Saml2.Schemas.Metadata
public class LocalizedUriType
{
/// <param name="uri">The URI.</param>
public LocalizedUriType(Uri uri)
public LocalizedUriType(string uri)
{
Uri = uri;
}

/// <param name="uri">The URI.</param>
public LocalizedUriType(Uri uri)
{
Uri = uri?.OriginalString;
}

/// <param name="uri">The URI.</param>
/// <param name="lang">The language.</param>
public LocalizedUriType(string uri, string lang) : this(uri)
{
Lang = lang;
}

/// <param name="uri">The URI.</param>
/// <param name="lang">The language.</param>
public LocalizedUriType(Uri uri, string lang) : this(uri)
public LocalizedUriType(Uri uri, string lang) : this(uri)
{
Lang = lang;
}
Expand All @@ -30,7 +43,7 @@ public LocalizedUriType(Uri uri, string lang) : this(uri)
/// <summary>
/// The URI.
/// </summary>
public Uri Uri { get; protected set; }
public string Uri { get; protected set; }

public XElement ToXElement(XName elementName)
{
Expand All @@ -48,7 +61,7 @@ protected IEnumerable<XObject> GetXContent()
yield return new XAttribute(XNamespace.Xml + Saml2MetadataConstants.Message.Lang, Lang);
}

yield return new XText(Uri.OriginalString);
yield return new XText(Uri);
}
}
}
4 changes: 2 additions & 2 deletions src/ITfoxtec.Identity.Saml2/Schemas/Metadata/Organization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class Organization

public Organization() { }

public Organization(string name, string displayName, Uri url)
public Organization(string name, string displayName, string url)
{
OrganizationNames = new[] { new LocalizedNameType(name) };
OrganizationDisplayNames = new[] { new LocalizedNameType(displayName) }; ;
Expand Down Expand Up @@ -49,7 +49,7 @@ public Organization(IEnumerable<LocalizedNameType> names, IEnumerable<LocalizedN
/// Specifies the URL of the organization.
/// </summary>
[Obsolete("The OrganizationURL method is deprecated. Please use OrganizationURLs which is a list of LocalizedUriType's.")]
public string OrganizationURL { get { return OrganizationURLs?.Select(o => o.Uri?.OriginalString).FirstOrDefault(); } }
public string OrganizationURL { get { return OrganizationURLs?.Select(o => o.Uri).FirstOrDefault(); } }

/// <summary>
/// [Required]
Expand Down

0 comments on commit 2c629d0

Please sign in to comment.