Last active
January 27, 2016 19:37
-
-
Save VisualBean/28a67e692907d1b751d0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class ApplyBasicAuth : IOperationFilter | |
{ | |
public string Name { get; private set; } | |
public ApplyBasicAuth() | |
{ | |
Name = "basic"; | |
} | |
public void Apply(Operation operation, SchemaRegistry schemaRegistry, ApiDescription apiDescription) | |
{ | |
var basicAuthDict = new Dictionary<string, IEnumerable<string>>(); | |
basicAuthDict.Add(Name, new List<string>()); | |
operation.security = new IDictionary<string, IEnumerable<string>>[] {basicAuthDict}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment