srv/core/AuthenticationService.js
function (authentication, callback) {
            /***
             * Let's save the authentication and so the user is logged in
             *
             */
            var token = generateId();
            var authenticationInstance = this.$.dataSource.createEntity(Authentication, token);

            authenticationInstance.set(authentication.$);
            authenticationInstance.save(null, callback);
        }
function (authentication, callback) {
            /***
             * Let's save the authentication and so the user is logged in
             *
             */
            var token = generateId();
            var authenticationInstance = this.$.dataSource.createEntity(Authentication, token);

            authenticationInstance.set(authentication.$);
            authenticationInstance.save(null, callback);
        }
function ( authentication , callback ) { /***
             * Let's save the authentication and so the user is logged in
             *
             */ var token = generateId ( ) ; var authenticationInstance = this . $ . dataSource . createEntity ( Authentication , token ) ; authenticationInstance . set ( authentication . $ ) ; authenticationInstance . save ( null , callback ) ; }
Saves an authentication and adds an token to it

@param authentication
@param callback
Saves an authentication and adds an token to it