sportngin/okcomputer — pull request #30 by pbyrne (2013-06-20 19:07:42+00:00)
Title: Allow Whitelisting Checks to Skip Authentication

For example, if using the "default" check in your load balancer, it doesn't make sense to require authentication for that, even if you want it on other checks.

This option to `OKComputer.require_authentication` allows listing a set of checks for which the authentication can be skipped.

QA Plan
-------

I tested this locally with an app, configuring it like so:

```ruby
OKComputer.require_authentication("foo", "bar", except: %w(default))
```

This gave me the expected behavior:

```
$ curl -I http://localhost:3000/okcomputer/all | grep HTTP
HTTP/1.1 401 Unauthorized

$ curl -I http://localhost:3000/okcomputer/default | grep HTTP
HTTP/1.1 200 OK

$ curl -I http://localhost:3000/okcomputer/database | grep HTTP
HTTP/1.1 401 Unauthorized

$ curl -I -ufoo:bar http://localhost:3000/okcomputer/database | grep HTTP
HTTP/1.1 200 OK
```