Have the OAuthPanel set the access token on the connection, when received
authorAndy Allan <gravitystorm@gmail.com>
Tue, 19 Oct 2010 10:10:24 +0000 (10:10 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Tue, 19 Oct 2010 10:10:24 +0000 (10:10 +0000)
net/systemeD/potlatch2/save/OAuthPanel.mxml
net/systemeD/potlatch2/save/SaveManager.as

index 5f56f4a6af9446d18df11e0f2e948b5b7d6bd3ad..6e5b68ccf7faccf4a7bd63e1909f4f272ea2e4f4 100644 (file)
             PopUpManager.removePopUp(this);
             
             _accessToken = getResponseToken(URLLoader(event.target));
+            Connection.getConnectionInstance().setAuthToken(_accessToken);
             dispatchEvent(new Event(ACCESS_TOKEN_EVENT));
         }
         
index 77e4f33428cc65596772063a24f14d77456c42ca..547293f2fc73487ba3e90518a6ee221c8c52794a 100644 (file)
@@ -26,7 +26,6 @@ package net.systemeD.potlatch2.save {
         private function doNothing():void {
             //hack hacky hack hack. Please look the other way...
             Connection.getConnectionInstance().setAppID(consumer);
-            Connection.getConnectionInstance().setAuthToken(accessToken);
         }
 
         private function save(callback:Function):void {
@@ -79,7 +78,6 @@ package net.systemeD.potlatch2.save {
                                saveDialog.dontPrompt();
                        } else {
                    Connection.getConnectionInstance().setAppID(consumer);
-                   Connection.getConnectionInstance().setAuthToken(accessToken);
                        }
         }
     }