5d1fb4c168
The client sends a 'validate_auth_token_request' to the server, that waits a 'validate_auth_token_reply' response from bbb-apps to pass to the client. Still have to get info from /api/enter, for now the meetingId and userId are hard-coded in the client (AuthenticationModel).
38 lines
822 B
CoffeeScript
38 lines
822 B
CoffeeScript
define [
|
|
'jquery',
|
|
'underscore',
|
|
'backbone',
|
|
'raphael',
|
|
'globals',
|
|
'cs!router',
|
|
'cs!models/connection',
|
|
'jquery.mousewheel',
|
|
'jquery.autosize',
|
|
'jquery.form',
|
|
'jquery.ui'
|
|
], ($, _, Backbone, Raphael, globals, Router, ConnectionModel) ->
|
|
|
|
globals.router = {}
|
|
globals.connection = {}
|
|
|
|
initialize = ->
|
|
# Authentication object, set when the user is authorized in
|
|
globals.currentAuth = null
|
|
|
|
# An event bus to handle events in the application
|
|
globals.events = _.extend({}, Backbone.Events)
|
|
|
|
# Default application router
|
|
globals.router = new Router()
|
|
|
|
# Default connection (websocket)
|
|
globals.connection = new ConnectionModel()
|
|
|
|
# Start at /login
|
|
globals.router.showLogin()
|
|
Backbone.history.start({silent: true})
|
|
|
|
return {
|
|
initialize: initialize
|
|
}
|