Ejemplo n.º 1
0
    def get_userdata_and_uuid(self, access_token, request):
        r = requests.get("https://www.googleapis.com/oauth2/v1/userinfo?access_token={accessToken}".format(accessToken = access_token))

        payload = json.loads(r.text)

        data = oauth.User_Data()

        data.real_name =  payload['name']
        data.email =  payload['email']

        uuid = auth.generate_static_uuid(payload['id'])

        return uuid, data
Ejemplo n.º 2
0
def pesudo_random_string_generator():
    return auth.generate_static_uuid(str(time.time()))
Ejemplo n.º 3
0
 def test_generate_static_uuid(self):
     self.assertEqual(auth.validate_uuid4(auth.generate_static_uuid(self.pesudo_random_string_generator())), True)
     secret = self.pesudo_random_string_generator()
     self.assertEqual(auth.generate_static_uuid(secret), auth.generate_static_uuid(secret))
Ejemplo n.º 4
0
def pesudo_random_string_generator():
    return auth.generate_static_uuid(str(time.time()))