Update to Spring IO version

- Update Spring Boot 1.2.3.RELEASE
- Update Spring Security 4.0.0.RELEASE
- Update Spring 4.1.6.RELEASE
- Update Groovy 2.3.8
- Update Jackson 2.4.5
- Update Jedis 2.5.2
- Update Spring Data Redis 1.4.2

Fixes gh-126
This commit is contained in:
Rob Winch
2015-04-07 16:30:57 -05:00
parent 3d1cd9fae4
commit 9ac570cba7
13 changed files with 49 additions and 21 deletions

View File

@@ -6,9 +6,23 @@ function ApplicationModel(stompClient) {
self.username = ko.observable();
self.conversation = ko.observable(new ImConversationModel(stompClient,this.username));
self.notifications = ko.observableArray();
self.csrfToken = ko.computed(function() {
return JSON.parse($.ajax({
type: 'GET',
url: 'csrf',
dataType: 'json',
success: function() { },
data: {},
async: false
}).responseText);
}, this);
self.connect = function() {
stompClient.connect({}, function(frame) {
var headers = {};
var csrf = self.csrfToken();
var headers = {};
headers[csrf.headerName] = csrf.token;
stompClient.connect(headers, function(frame) {
console.log('Connected ' + frame);
self.username(frame.headers['user-name']);
@@ -43,7 +57,7 @@ function ApplicationModel(stompClient) {
self.conversation().receiveMessage(JSON.parse(message.body));
});
}, function(error) {
self.pushNotification(error)
self.pushNotification(error)
console.log("STOMP protocol error " + error);
});
}