Skip to content

therealedsheenan/quickchativa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quickchativa Build Status

Rails API server for chat application.

This is a Rails API server that uses JWT for authentication. To access User, Chat and Room models, the client MUST have the authenticated token.

Getting started

  • Creating the actual User.

    Open the rails console and create a dummy user.

    User.create(:email => '[email protected]', :password => '123', :password_confirmation => '123')
    
  • Authenticating the User.

    Create a server request

    curl -H "Content-Type: application/json" -X POST -d '{"email":"[email protected]","password":"123"}' http://localhost:3000/api/v1/authenticate
    

    This will return the TOKEN which you can attach to your header request in accessing the other routes.

  • Sample Request Header

    Request to chats

    curl -H "Authorization: SAMPLE_TOKEN" http://localhost:3000/api/v1/chats
    

    Request to rooms

    curl -H "Authorization: SAMPLE_TOKEN" http://localhost:3000/api/v1/rooms
    

Without a validated TOKEN, you cannot access the anything on the server.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Rails API server for chat application

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published