33 * https://github.com/doubleleft/dl-api-javascript
44 *
55 * @copyright 2014 Doubleleft
6- * @build 6/26 /2014
6+ * @build 7/1 /2014
77 */
88( function ( define ) { 'use strict' ;
99define ( function ( require ) {
@@ -583,15 +583,6 @@ DL.Auth.prototype.register = function(provider, data) {
583583 return promise ;
584584} ;
585585
586- /**
587- * @method authenticate
588- * @see register
589- */
590- DL . Auth . prototype . authenticate = function ( ) {
591- console . log ( "auth.authenticate method is deprecated. Please use auth.register." ) ;
592- return this . register . apply ( this , arguments ) ;
593- } ;
594-
595586/**
596587 * Verify if user is already registered, and log-in if succeed.
597588 * @method login
@@ -612,22 +603,13 @@ DL.Auth.prototype.authenticate = function() {
612603DL . Auth . prototype . login = function ( provider , data ) {
613604 var promise , that = this ;
614605 if ( typeof ( data ) === "undefined" ) { data = { } ; }
615- promise = this . client . post ( 'auth/' + provider + '/verify ' , data ) ;
606+ promise = this . client . post ( 'auth/' + provider + '/login ' , data ) ;
616607 promise . then ( function ( data ) {
617608 that . _registerToken ( data ) ;
618609 } ) ;
619610 return promise ;
620611} ;
621612
622- /**
623- * @method verify
624- * @see login
625- */
626- DL . Auth . prototype . verify = function ( ) {
627- console . log ( "auth.verify method is deprecated. Please use auth.login." ) ;
628- return this . login . apply ( this , arguments ) ;
629- } ;
630-
631613/**
632614 * Send a 'forgot password' confirmation email to target user email address.
633615 * @method forgotPassword
@@ -1683,6 +1665,7 @@ DL.Channel.SSE.prototype.subscribe = function(event, callback) {
16831665/**
16841666 */
16851667DL . Channel . SSE . prototype . _trigger = function ( event , data ) {
1668+ console . log ( "Trigger: " , event , data ) ;
16861669 // always try to dispatch default message handler
16871670 if ( event . indexOf ( 'state:' ) === - 1 && this . callbacks . _default ) {
16881671 this . callbacks . _default . apply ( this , [ event , data ] ) ;
0 commit comments