Before you use it, you need to register your application at http://dev.twitter.com/ in order to get the consumer key and secret. Also, this middleware requires you to specify `callback url` of your app to be, for example, the root url of you application. Basically in need something other then blank string or "oob".

Second, the middleware requires you to specify the root URL in the app builder in order to properly build the real callback URL and many other URLs as the parameter for api.twitter.com.

Third, you need to name your authentication scope like "users". This may sound awkward and unnecessary but it allows the flexibility to allow multiple set of login. For example, you app can have a "users" scope for whoever sign-in from from twitter, and a "admin" scope from password-based authentication.

Last, and the most important, you need to enable "Session" middleware. The implementation requires Plack::Middleware::Session and stores relevant authentication information under $env-{psgi.session}{doorman.${scope}.twitter}>, where $scope is the scope name given by you. You may inspect this variable at runtime to get the basic idea of how the middleware stores relevant information.

After that, you can invoke several methods listed down below on the object stored in $env-{'doorman.users.twitter'}>, which is of this <Plack::Middleware::DoormanTwitter> class.