-
Notifications
You must be signed in to change notification settings - Fork 217
WIP: Managment session (now - refactoring) #241
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
Conversation
…nagmentSession # Conflicts: # quickblox.min.js
…nagmentSession # Conflicts: # quickblox.min.js # samples/newChat/css/dashboard.css # samples/newChat/css/style.css # samples/newChat/index.html # samples/newChat/js/QBconfig.js # samples/newChat/js/app.js # samples/newChat/js/dialog.js # samples/newChat/js/helpers.js # samples/newChat/js/listeners.js # samples/newChat/js/message.js # samples/newChat/js/user.js
…nagmentSession # Conflicts: # quickblox.min.js
…nagmentSession # Conflicts: # quickblox.min.js # samples/newChat/js/QBconfig.js # spec/QB-LocationSpec.js # spec/SpecRunner.html
need add local storage
add build
…nagmentSession # Conflicts: # quickblox.min.js # spec/QB-ChatSpec.js # src/modules/qbAuth.js # src/qbProxy.js
…nagmentSession # Conflicts: # quickblox.min.js
src/qbProxy.js
Outdated
| }; | ||
|
|
||
| if(config.sessionManagement.enable) { | ||
| if(errorMsg.code === 401) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this 'if' check? what case/situation?
Would be greate to have some comments what is happening here
src/qbProxy.js
Outdated
| if(params.url.indexOf(config.urls.login) !== -1 && params.type === 'DELETE') { | ||
| callback(); | ||
| } else if(params.url.indexOf(config.urls.login) !== -1 && params.type === 'POST') { | ||
| self.sessionManager.saveUserParams(params); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Правильно будет сохранять юзер кренделя при success ответе.
В противном случае логин может быть неуспешным и тогда в кеше будут невалидные данные.
И тогда при следующем запросе они я так понимаю будут использоваться?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А, я вижу, что ты это уже делаешь внутри success. Тогда тут зачем сохранять?
Make sure that you wrote the tests for your proposed changes and the existing test was success.
Made/Proposed changes:
It doesn't include 3-rd party service sessions for now.
How should this be manually tested?
Does the documentation need an update?
Yes