Skip to content

Commit

Permalink
Automatically set LoadMetadata=true if MetadataLocation is present in…
Browse files Browse the repository at this point in the history
… web.config

- Fixes #675
  • Loading branch information
AndersAbel committed Mar 29, 2017
1 parent c4b05a1 commit a7e58b5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion Kentor.AuthServices.Tests/IdentityProviderTests.cs
Expand Up @@ -416,7 +416,6 @@ public void IdentityProvider_Ctor_PrefersRedirectBindingForLogout()
public void IdentityProvider_Ctor_UseMetadataLocationUrl()
{
var config = CreateConfig();
config.LoadMetadata = true;
config.MetadataLocation = "http://localhost:13428/idpMetadataDifferentEntityId";
config.EntityId = "some-idp";

Expand Down
2 changes: 1 addition & 1 deletion Kentor.AuthServices/IdentityProvider.cs
Expand Up @@ -76,7 +76,7 @@ internal IdentityProvider(IdentityProviderElement config, SPOptions spOptions)

// If configured to load metadata, this will immediately do the load.
this.spOptions = spOptions;
LoadMetadata = config.LoadMetadata;
LoadMetadata = config.LoadMetadata || !string.IsNullOrEmpty(config.MetadataLocation);

// Validate if values are only from config. If metadata is loaded, validation
// is done on metadata load.
Expand Down

0 comments on commit a7e58b5

Please sign in to comment.