X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F06_net%2F10_XOAuth2.js;h=e43d5084f491ce9fe32f1f2d64b63ea209ccf4a0;hb=326aa8b45801298cafb13d4fd367cd240cfc4abc;hp=f11bb1371f59d30b164eb3fab6b66626910ce45d;hpb=2956150a7c2798e60639b36d69b0c13f6b20a62a;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/06_net/10_XOAuth2.js b/0.6.x/js/06_net/10_XOAuth2.js index f11bb13..e43d508 100644 --- a/0.6.x/js/06_net/10_XOAuth2.js +++ b/0.6.x/js/06_net/10_XOAuth2.js @@ -40,6 +40,8 @@ X[ 'OAuth2' ] = X_EventDispatcher[ 'inherits' ]( obj.onAuthError = X_NET_OAUTH2_onXHR401Error; obj.updateRequest = X_NET_OAUTH2_updateRequest; + + // TODO kill の cancel }, 'authState' : function(){ @@ -58,10 +60,10 @@ X[ 'OAuth2' ] = X_EventDispatcher[ 'inherits' ]( X_NET_OAUTH2_authorizationWindow = window.open( pair[ 'authorizeEndpoint' ] + '?' + X_URL_objToParam( { - response_type : 'code', - client_id : pair[ 'clientID' ], - redirect_uri : tpair[ 'redirectURI' ], - scope : ( pair[ 'scopes' ] || []).join(' ') + 'response_type' : 'code', + 'client_id' : pair[ 'clientID' ], + 'redirect_uri' : tpair[ 'redirectURI' ], + 'scope' : ( pair[ 'scopes' ] || []).join(' ') } ), 'oauthauthorize', 'width=' + pair[ 'authorizeWindowWidth' ] @@ -250,7 +252,7 @@ function X_NET_OAUTH2_onXHR401Error( oauth2 ){ if ((( bearerParams && bearerParams.indexOf( ' error="invalid_token"' ) !== -1 ) || !headersExposed) && _getRefreshToken( oauth2 ) ) { _removeAccessToken( oauth2 ); // It doesn't work any more. pair.oauth2State = 2; - oauth2.refreshToken(); + oauth2[ 'refreshToken' ](); } else if (!headersExposed && !_getRefreshToken( oauth2 )) { pair.oauth2State = 0;