-
- Downloads
Merge branch '18302-use-rails-cookie-in-api' into 'master'
Allow the Rails cookie to be used for API authentication Makes the Rails cookie into a valid authentication token for the Grape API, and uses it instead of token authentication in frontend code that uses the API. Rendering the private token into client-side javascript is a security risk; it may be stolen through XSS or other attacks. In general, re-using API code in the frontend is more desirable than implementing endless actions that return JSON. Closes #18302 See merge request !1995
No related branches found
No related tags found
Showing
- app/assets/javascripts/api.js 0 additions, 8 deletionsapp/assets/javascripts/api.js
- doc/api/README.md 12 additions, 4 deletionsdoc/api/README.md
- lib/api/api_guard.rb 13 additions, 43 deletionslib/api/api_guard.rb
- lib/api/helpers.rb 20 additions, 3 deletionslib/api/helpers.rb
- lib/gitlab/gon_helper.rb 0 additions, 1 deletionlib/gitlab/gon_helper.rb
- spec/requests/api/api_helpers_spec.rb 25 additions, 0 deletionsspec/requests/api/api_helpers_spec.rb
Please register or sign in to comment