Sha256: f51dcdd6518b2739f449f532c0d7f234be8b1c97c10b885e3f5c00e04152d3da

Contents?: true

Size: 1.67 KB

Versions: 1

Compression:

Stored size: 1.67 KB

Contents

# MinimalistAuthentication
A Rails authentication gem that takes a minimalist approach. It is designed to be simple to understand, use, and modify for your application.


## Installation
Add this line to your application's Gemfile:

```ruby
gem 'minimalist_authentication'
```

And then execute:
```bash
$ bundle
```

Create a user model for with **email** for an identifier:
```bash
bin/rails generate model user active:boolean email:string crypted_password:string salt:string last_logged_in_at:datetime
```

OR create a user model with **username** for an identifier:
```bash
bin/rails generate model user active:boolean username:string crypted_password:string salt:string last_logged_in_at:datetime
```


## Example
Include Minimalist::Authentication in your user model (app/models/user.rb)
```ruby
class User < ApplicationRecord
  include Minimalist::Authentication
end
```

Include Minimalist::Authorization in your ApplicationController (app/controllers/application.rb)
```ruby
class ApplicationController < ActionController::Base
  include Minimalist::Authorization
end
```

Include Minimalist::Sessions in your SessionsController (app/controllers/sessions_controller.rb)
```ruby
class SessionsController < ApplicationController
  include Minimalist::Sessions
end
```

Include Minimalist::TestHelper in your test helper (test/test_helper.rb)
```ruby
class ActiveSupport::TestCase
  include Minimalist::TestHelper
end
```

## Build
[![Build Status](https://travis-ci.org/wwidea/minimalist_authentication.svg?branch=master)](https://travis-ci.org/wwidea/minimalist_authentication)


## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minimalist_authentication-1.1.1 README.md