Skip to content

Commit

Permalink
Added DisableAllAuthenticationBut(enabledAuthenticationType)
Browse files Browse the repository at this point in the history
example output:
[iis7] Setting authentication for application 'testing': 'digestAuthentication' from 'False' to 'False'
[iis7] Setting authentication for application 'testing': 'anonymousAuthentication' from 'False' to 'False'
[iis7] Setting authentication for application 'testing': 'iisClientCertificateMappingAuthentication' from 'False' to 'False'
[iis7] Setting authentication for application 'testing': 'basicAuthentication' from 'True' to 'False'
[iis7] Setting authentication for application 'testing': 'clientCertificateMappingAuthentication' from 'False' to 'False'
[iis7] Setting authentication for application 'testing': 'windowsAuthentication' from 'False' to 'True'
  • Loading branch information
AkosLukacs authored and drusellers committed Mar 31, 2012
1 parent 49f7480 commit 2e89bd1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions product/dropkick/Configuration/Dsl/Iis/IisProtoTask.cs
Expand Up @@ -162,5 +162,12 @@ public override void RegisterRealTasks(PhysicalServer s)
}
return this;
}

public IisVirtualDirectoryOptions DisableAllAuthenticationBut(IISAuthenticationMode enabledAuthenticationType) {
foreach(IISAuthenticationMode mode in Enum.GetValues(typeof(IISAuthenticationMode))) {
AuthenticationToSet.Add(mode, mode == enabledAuthenticationType);
}
return this;
}
}
}
Expand Up @@ -27,6 +27,12 @@ public interface IisVirtualDirectoryOptions
/// <returns></returns>
IisVirtualDirectoryOptions DisableAllAuthentication();
/// <summary>
/// Disable all, but this one...
/// </summary>
/// <param name="enabledAuthenticationType"></param>
/// <returns></returns>
IisVirtualDirectoryOptions DisableAllAuthenticationBut(dropkick.Tasks.Iis.IISAuthenticationMode enabledAuthenticationType);
/// <summary>
/// Enable or disable a given authentication type.
/// </summary>
/// <param name="authenticationType"></param>
Expand Down

0 comments on commit 2e89bd1

Please sign in to comment.