Commits

James Michael DuPont committed 76b658c

update to remove auth

  • Participants
  • Parent commits c401482

Comments (0)

Files changed (3)

File app/app.yaml

 
 - url: /export/pledge/.*
   script: theanticorruptionpledge.app
-  login: required
+#  login: required
 #  secure: always
 
 - url: /.*

File app/theanticorruptionpledge_csv_export.py

         log.debug("File:")
         log.debug( f)
         
-        if not users.is_current_user_admin():
-            self.response.set_status(403,message="Forbidden")
-            self.response.headers['Content-type'] = 'text/html'        
-            self.response.out.write('<h1>Forbidden</h1>') # emit it
-            return
+        # if not users.is_current_user_admin():
+        #     self.response.set_status(403,message="Forbidden")
+        #     self.response.headers['Content-type'] = 'text/html'        
+        #     self.response.out.write('<h1>Forbidden</h1>') # emit it
+        #     return
 
         log.debug( '<h1>Starting to write</h1>')
         self.response.out.write('<h1>Starting to write</h1>') # emit it

File scripts/getgoogle.pl

 use WWW::Google::ClientLogin;
 use HTTP::Cookies;
 use LWP::UserAgent;
-use LWP::Protocol::https; # preload
+#use LWP::Protocol::https; # preload
 use HTTP::Request::Common qw(POST);
 
 #see http://johannilsson.com/2011/04/13/authenticated-requests-on-app-engine.html
 die $res->status_line if $res->is_error;
  
 my $auth_token = $res->auth_token;
-my $app="https://3.theanticorruptionpledge.appspot.com/";
+my $app="http://3.theanticorruptionpledge.appspot.com/";
 
 # see https://groups.google.com/forum/?fromgroups=#!msg/iplay4e/bWOKc9nO6ZY/7K-tkNtq570J
 my $appauth = $app . "_ah/login";
 $ua->cookie_jar(HTTP::Cookies->new(file => "cookies.txt", autosave =>
 1));
 
-warn $appauth;
-my $response = $ua->get( $appauth . '?continue=' . $app . '&auth=' . $auth_token    );
+warn "app auth:$appauth";
+warn "auth token:$auth_token";
+my $getauth =$appauth . '?continue=' . $app . '&auth=' . $auth_token  ;
+warn $getauth;
+
+#https://accounts.google.com/ServiceLogin?service=ah&passive=true&continue=https://appengine.google.com/_ah/conflogin%3Fcontinue%3Dhttps://3.theanticorruptionpledge.appspot.com/export/pledge/RI/csv/&ltmpl=gm&shdf=CiYLEgZhaG5hbWUaGlRoZSBBbnRpLUNvcnJ1cHRpb24gUGxlZGdlDBICYWgiFJEeIklWvgF62yGy2aZBThhL6a96KAEyFMOkNNpxjswErOrLAA31Hva0vxeW
+
+my $response = $ua->get( $getauth  );
+
 die "\nError: ", $response->status_line unless $response->is_success;
 
 my %STATES = {