Ejemplo n.º 1
0
 def post(self):
     boolDict = {'false':False,'true':True}
     
     email = self.request.get('email')
     public = self.request.get('public')
     private = self.request.get('private')
     is_secure = self.request.get('is_secure')
     is_secure = boolDict[is_secure.lower()]
     SignatureVersion = self.request.get('SignatureVersion')
     
     meSchema.putCredentials(email,public,private,is_secure,SignatureVersion)
     self.redirect('/config/getSettings')
Ejemplo n.º 2
0
    def get(self):
        self.response.headers['Content-Type'] = 'text/plain'
        action = str(self.request.get('action'))
        email = str(self.request.get('email'))
        password = str(self.request.get('password'))

        if action == 'put' and len(email) > 3 and len(password) > 3:
            self.response.out.write("Putting Credentials\n")
            meSchema.putCredentials(email,password)
        elif action == 'get':
            self.response.out.write("Getting Credentials for %s\n" % email)
            credentials = meSchema.getCredentials(email)
            if not (credentials is None):
                self.response.out.write("email: %s\npass: %s\n"%(credentials.email,credentials.password))
            else:
                self.response.out.write('Found no credentials')