Hrm. It might not be as simple as that. The `authenticate_with_http_basic` instance method only calls the block if a username and password are provided, it seems. The code would end up looking more like this, which I'm not really liking, since it still ties us directly with HTTP Basic and still requires the OKComputer boolean in the controller (albeit within a method, at least):

```ruby
def authenticate
  if OKComputer.require_authentication?
    unless authenticate_with_http_basic { |username, password| OKComputer.authenticate(username, password) }
      request_http_basic_authentication
    end
  end
end
```