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 5f56f4a..6e5b68c 100644 (file)
             PopUpManager.removePopUp(this);
             
             _accessToken = getResponseToken(URLLoader(event.target));
+            Connection.getConnectionInstance().setAuthToken(_accessToken);
             dispatchEvent(new Event(ACCESS_TOKEN_EVENT));
         }
         
index 77e4f33..547293f 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);
                        }
         }
     }