internal BasicAuthenticationMiddleware(Func<IDictionary<string, object>, Task> next, BasicAuthenticationProtocol protocol) { if (next == null) { throw new ArgumentNullException("next"); } if (protocol == null) { throw new ArgumentNullException("protocol"); } _next = next; _protocol = protocol; }
internal BasicAuthenticationMiddleware(Func <IDictionary <string, object>, Task> next, BasicAuthenticationProtocol protocol) { if (next == null) { throw new ArgumentNullException("next"); } if (protocol == null) { throw new ArgumentNullException("protocol"); } _next = next; _protocol = protocol; }
public BasicAuthenticationMiddleware(Func<IDictionary<string, object>, Task> next, BasicAuthenticationOptions options) { if (next == null) { throw new ArgumentNullException("next"); } if (options == null) { throw new ArgumentNullException("options"); } if (options.Provider == null) { // TODO: Get error messages from resources. throw new ArgumentException("BasicAuthenticationOptions.Provider must not be null.", "options"); } _next = next; _protocol = new BasicAuthenticationProtocol(options.Provider, options.Realm); }
public BasicAuthenticationMiddleware(Func <IDictionary <string, object>, Task> next, BasicAuthenticationOptions options) { if (next == null) { throw new ArgumentNullException("next"); } if (options == null) { throw new ArgumentNullException("options"); } if (options.Provider == null) { // TODO: Get error messages from resources. throw new ArgumentException("BasicAuthenticationOptions.Provider must not be null.", "options"); } _next = next; _protocol = new BasicAuthenticationProtocol(options.Provider, options.Realm); }