README.md in prx_auth-rails-0.3.0 vs README.md in prx_auth-rails-1.0.0
- old
+ new
@@ -12,10 +12,33 @@
$ bundle
## Usage
-That should be it, I think.
+Installing the gem in a Rails project will automatically add the appropriate Rack middleware to your Rails application and add two methods to your controllers. These methods are:
+
+* `prx_auth_token`: returns a token (similar to PrxAuth::Token) which automatically namespaces queries. The main methods you will be interested in are `authorized?`, `globally_authorized?` and `resources`. More information can be found in PrxAuth.
+
+* `prx_authenticated?`: returns whether or not this request includes a valid PrxAuth token.
+
+### Configuration
+
+Generally, configuration is not required and the gem aims for great defaults, but you can override some settings if you need to change the default behavior.
+
+In your rails app, add a file to config/initializers called `prx_auth.rb`:
+
+```ruby
+PrxAuth::Rails.configure do |config|
+
+ # enables automatic installation of token parser middleware
+ config.install_middleware = false # default: true
+
+ # automatically adds namespace to all scoped queries, e.g. .authorized?(:foo) will be treated
+ # as .authorized?(:my_great_ns, :foo). Has no impact on unscoped queries.
+ config.namespace = :my_great_ns # default: derived from Rails::Application name.
+ # e.g. class Feeder < Rails::Application => :feeder
+end
+```
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)