obj.onAuthError = X_NET_OAUTH2_onXHR401Error;
obj.updateRequest = X_NET_OAUTH2_updateRequest;
+
+ // TODO kill の cancel
},
'authState' : function(){
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' ]
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;