cybertooth-io / ermahgerd-rails-api-jwt

Rails 5+ API, JWT_Session, Pundit, JSONAPI, Sidekiq, PostgreSQL.
0 stars 0 forks source link

Refactor - `AuthenticationsController` to become `CookieAuthenticationsController` #8

Closed nadnoslen closed 6 years ago

nadnoslen commented 6 years ago

Make room for authenticating in one of two ways:

  1. Cookie-based authentication will store your access token in a cookie and a CSRF token will be required for every PATCH/PUT/DELETE (CookieAuthenticationsController)
  2. Token authentication will return you the access token which you are responsible for saving safely and then passing with every request to protected resources (TokenAuthenticationsController)