Rails 5 API Authetication
Authentication with Rails authenticate_with_http_token
Section titled “Authentication with Rails authenticate_with_http_token”authenticate_with_http_token do |token, options| @user = User.find_by(auth_token: token)endYou can test this endpoint with curl by making a request like
curl -IH "Authorization: Token token=my-token" http://localhost:3000