OSDN Git Service

Version 0.6.160, fix X.Net.
[pettanr/clientJs.git] / 0.6.x / js / 06_net / 10_XOAuth2.js
index 8bdd18d..3564a13 100644 (file)
@@ -260,7 +260,7 @@ function X_Net_OAuth2_authorizationCode( oauth2, pair ){
 };
 
 function X_Net_OAuth2_responceHandler( e ){
-       var data = e.data,
+       var data = e.response,
                pair = X_Pair_get( this ),
                isRefresh = pair.oauth2State === 3;
        
@@ -271,13 +271,13 @@ function X_Net_OAuth2_responceHandler( e ){
                        if( isRefresh && data.error ){
                                _removeRefreshToken( this );
                                pair.oauth2State = 0;
-                               this[ 'asyncDispatch' ]( { type : X_EVENT_ERROR, message : 'Refresh access token error.' + data.error, data : data } );
+                               this[ 'asyncDispatch' ]( { type : X_EVENT_ERROR, message : 'Refresh access token error.' } );
                                this[ 'asyncDispatch' ]( X_EVENT_NEED_AUTH );
                                return;
                        } else
                        if( data.error ){
                                pair.oauth2State = 0;
-                               this[ 'asyncDispatch' ]( { type : X_EVENT_ERROR, message : 'Get new access token error.' + data.error, data : data } );
+                               this[ 'asyncDispatch' ]( { type : X_EVENT_ERROR, message : 'Get new access token error.' } );
                                this[ 'asyncDispatch' ]( X_EVENT_NEED_AUTH );
                                return;
                        };