Commit graph

2 commits

Author SHA1 Message Date
Jeffrey Layanto
f23c3b26ca Fix cookie authentication in node and browser (#108)
* Pass slouch in when instantiating EnhancedRequest

This is to allow EnhanceRequest to access slouch._requestWrapper.setCookie

* Update locally stored cookie when response has set-cookie header

* Delete unused this._cookie

* Fix cookie-authentication in browser

* Fix test

Request header now always include withCredentials: true

* Fix test

EnhancedRequest constructor now requires instance of Slouch

* Typo

* Fix test

* Remove TODO comment and clean up redundant code

* Revert change to user.js

* Fix user test spec

* Fix user test spec

* Fix browser coverage test fail

* FIx beautify test fail

* Fix failed jshint test
2019-03-21 19:55:59 -07:00
Geoff Cox
54a60e7a21 feat(auth): cookie authentication in node (#27)
* feat(cookie): request-wrapper

* test(request-wrapper): 100% coverage

* test(browser): 100% coverage

* refactor(request-class): rename to enhanced-request

* feat(get-session)

* feat(enhanced-request): full response

* refactor(enhanced-request): enhanced opts

* feat(example): authentication
2017-09-23 04:49:07 -07:00