Skip to content

Commit

Permalink
Merge pull request #5 from dina-heidar/dev
Browse files Browse the repository at this point in the history
Metadata bug fix
  • Loading branch information
dina-heidar authored Apr 27, 2023
2 parents f134914 + 31db683 commit 1a9daab
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 25 deletions.
6 changes: 3 additions & 3 deletions samples/Mvc.Post.PostBinding/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ public static void Main(string[] args)
},
Organization = new Organization
{
//OrganizationDisplayName = "Louisiana State Government",
OrganizationDisplayName = "Louisiana State Government",
OrganizationName = "Department of Corrections IdentityApi",
//OrganizationURL = new Uri("https://identityAPI.doc.la.gov"),
//Language = "en-US"
OrganizationURL = new Uri("https://identityAPI.doc.la.gov"),
Language = "en-US"
},
// add an sp logo to the idp sign in page
UiInfo = new UiInfo
Expand Down
1 change: 0 additions & 1 deletion samples/Mvc.Post.PostBinding/wwwroot/Metadata.xml

This file was deleted.

2 changes: 1 addition & 1 deletion src/saml2.authentication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ This is a dotnet tool when to added, it can authenticate and logout using SAML2.

The tools will add authentication middleware to the request pipeline.

Click here for [documentation](https://saml2-documentation.readthedocs.io/en/latest/getting-started/)
Click here for [documentation](https://saml2-authentication.readthedocs.io/en/latest/getting-started/)
2 changes: 1 addition & 1 deletion src/saml2.authentication/Saml2ConfigureOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void Configure(string name, Saml2Options options)
options.ValidAudiences = options.ValidAudiences;
options.ValidateIssuer = options.ValidateIssuer;
options.ValidIssuers = options.ValidIssuers;
options.ValidateMetadata = options.ValidateMetadata;
//options.ValidateMetadata = options.ValidateMetadata;
options.VerifySignatureOnly = options.VerifySignatureOnly;
options.WantAssertionsSigned = options.WantAssertionsSigned;
options.SignOutQueryString = options.SignOutQueryString;
Expand Down
11 changes: 1 addition & 10 deletions src/saml2.authentication/Saml2Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Saml2Options()
DefaultMetadataFolderLocation = "wwwroot";
DefaultMetadataFileName = "Metadata";
CreateMetadataFile = false;
ValidateMetadata = true;
//ValidateMetadata = true;

//cookie
Saml2CookieName = Saml2Defaults.AuthenticationScheme;
Expand Down Expand Up @@ -490,15 +490,6 @@ public Saml2Options()
/// The valid issuers.
/// </value>
public IEnumerable<string> ValidIssuers { get; set; } = new List<string>();

/// <summary>
/// Gets or sets a value indicating whether to validate
/// the metadata xml against the xsd schema upon creation
/// </summary>
/// <value>
/// <c>true</c> if validate; otherwise, <c>false</c>.
/// </value>
public bool ValidateMetadata { get; set; }
/// <summary>
/// Gets or sets the bool responsible for signature validation
/// true to verify the signature only;
Expand Down
8 changes: 4 additions & 4 deletions src/saml2.authentication/Saml2PostConfigureOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ public void PostConfigure(string name, Saml2Options options)
var xmlDoc = _writer.Output(bsm);

//validate the saml sp metadata file
if (options.ValidateMetadata)
{
_writer.Validate(xmlDoc);
}
//if (options.ValidateMetadata)
//{
// _writer.Validate(xmlDoc);
//}

//save
xmlDoc.Save(Path.Combine(options.DefaultMetadataFolderLocation,
Expand Down
10 changes: 5 additions & 5 deletions src/saml2.authentication/saml2.authentication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
<PackageTags>authentication;dotnet;security;saml2;.NETCore;SSO;SLO;.NET;identity;aspnetcore</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Version>6.1.1</Version>
<AssemblyVersion>6.1.1.0</AssemblyVersion>
<FileVersion>6.1.1.0</FileVersion>
<Version>6.1.2</Version>
<AssemblyVersion>6.1.2.0</AssemblyVersion>
<FileVersion>6.1.2.0</FileVersion>
<PackageIcon>images\icon_128x128.png</PackageIcon>
<InformationalVersion>This is a release package</InformationalVersion>
<Authors>Dina Heidar</Authors>
<Company></Company>
<Product>Saml2.Authentication</Product>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://saml2-documentation.readthedocs.io/en/latest/getting-started</PackageProjectUrl>
<PackageProjectUrl>https://saml2-authentication.readthedocs.io/en/latest/getting-started</PackageProjectUrl>
<RepositoryUrl>https://github.com/dina-heidar/saml2-authentication</RepositoryUrl>
<NeutralLanguage>en</NeutralLanguage>
<PackageReleaseNotes>Documentation site</PackageReleaseNotes>
<PackageReleaseNotes>Fixed generate metadata file bug</PackageReleaseNotes>
<RepositoryType>Git</RepositoryType>
<Title>Saml2.Authentication</Title>
<Copyright>Copyright Dina Heidar</Copyright>
Expand Down

0 comments on commit 1a9daab

Please sign in to comment.