Sha256: 8b21939c61adbed0d96cf61093f99df2642d4b77ce157833bedb06d7cbf0cccd

Contents?: true

Size: 852 Bytes

Versions: 1

Compression:

Stored size: 852 Bytes

Contents

# EasyAuth

An easy(ish) way to use API tokens in your services

## Installation

Add this line to your application's Gemfile:

    gem 'easy_auth'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install easy_auth

## Usage

Set your API token for your service:

    $ export API_TOKEN=your_api_token

Include in your controller

```ruby
class ApplicationController < ActionController::Base
  include EasyAuth
  before_filter :easy_authenticate!
end
```

Add your API token to your request header on your client:

    $ curl --header "HTTP_X_API_TOKEN: your_api_token" api.yourservice.com

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ez_auth-0.0.1 README.md