-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Headers instead of sessions on scaffolding for API apps #2043
Comments
The scaffolding was based on the old controller specs, it simply wasn't something considered. Only hesitation is that switching would have to consider the difference in how headers are handled across rails versions, this would need to be tested as working on all versions of Rails and not just as "output" is correct. |
@exocode Do you want to work on a PR to validate the behavior on Rails versions supported by rspec-rails? |
@benoittgt I would give it a try :-) |
I was wondering about this when I worked on my PR. I am not sure if I understand the initial problem of this issue correctly, but in my opinion this is less of an issue now because since #2288 scaffolding with the |
Closing since I think this is solved now. |
I have a question regarding to scaffolding on API only apps.
Each time I scaffold an spec (controllers for example) it writes
session: valid_session
instead of
headers: valid_headers
Wouldn't it be better to scaffold with
headers
instead ofsessions
?The most APIs are using JWT or other tokens to authenticate.
Aren't Sessions mostly obsolete in APIs?
The text was updated successfully, but these errors were encountered: