Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gonzalo-bulnes/rails-api-authentication-demo
Demonstrate the Simple Token Authentication usage in a Rails::API app.
https://github.com/gonzalo-bulnes/rails-api-authentication-demo
api authentication demo rails
Last synced: 25 days ago
JSON representation
Demonstrate the Simple Token Authentication usage in a Rails::API app.
- Host: GitHub
- URL: https://github.com/gonzalo-bulnes/rails-api-authentication-demo
- Owner: gonzalo-bulnes
- Created: 2015-02-24T17:06:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-26T03:19:55.000Z (over 8 years ago)
- Last Synced: 2024-10-09T09:34:01.444Z (about 1 month ago)
- Topics: api, authentication, demo, rails
- Language: Ruby
- Homepage:
- Size: 29.3 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Demo: Rails::API Authentication
===============================Demonstrate the [Simple Token Authentication][sta] usage in a Rails::API app.
[sta]: https://github.com/gonzalo-bulnes/simple_token_authentication
Usage
-----### Local
```bash
rackup -p 3000 # see http://localhost:3000
```### Heroku
Click the button below to automatically set up the demo in an app running on your Heroku account.
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
Alternatively, you can manually create a Heroku app and use Git to push and deploy.
User Data and Must See
----------------------The demo user is called Alice, she doesn't need to authenticate to acceed `/`, however she can do it through token authentication. See the home page [with authentication][optionnal_with] and [without authentication][optionnal_without].
On the contrary, she must authenticate in ordder to aceed to `/restricted_index`. Of course, she can do it through token authentication. See the restricted home page [with authentication][required_with] and [without authentication][required_without].
[optionnal_with]: https://rails-api-authentication.herokuapp.com/[email protected]&user_token=1G8_s7P-V-4MGojaKD7a
[optionnal_without]: https://rails-api-authentication.herokuapp.com/
[required_with]: https://rails-api-authentication.herokuapp.com/[email protected]&user_token=1G8_s7P-V-4MGojaKD7a
[required_without]: https://rails-api-authentication.herokuapp.com/restricted_index