Permalink
Browse files

Moved API keys to a compiled Python file. not going to stop someone d…

…etermined but better than plain text.
  • Loading branch information...
1 parent 0b5d9ef commit 7d5d20d77dbe99345afd357a184af6ba2d465a75 @lavelle committed Apr 29, 2012
Showing with 10 additions and 11 deletions.
  1. +6 −3 .gitignore
  2. BIN src/lib/apikeys.pyc
  3. +4 −2 src/lib/dbox.py
  4. +0 −6 src/lib/dropbox/api.json
View
9 .gitignore
@@ -1,8 +1,11 @@
-*/api.json
*.sublime-project
*.sublime-workspace
-test.txt
-test.png
+
*.pyc
+
+!src/lib/apikeys.pyc
+src/lib/apikeys.py
+
clipcloud/*
+
*.DS_Store
View
BIN src/lib/apikeys.pyc
Binary file not shown.
View
6 src/lib/dbox.py
@@ -1,8 +1,11 @@
import webbrowser
import json
+
from dropbox.session import DropboxSession
from dropbox.client import DropboxClient
+
from lib.settings import *
+from lib.apikeys import *
from lib.message import Message
@@ -17,8 +20,7 @@ def __init__(self, in_user_mode=True):
self.m = Message(in_user_mode=in_user_mode)
- api_details = json.load(open('lib/dropbox/api.json'))['dropbox']
- session = DropboxSession(api_details['key'], api_details['secret'], self.ACCESS_TYPE)
+ session = DropboxSession(API_KEY, API_SECRET, self.ACCESS_TYPE)
# if there is a token saved, that can be used to connect with dropbox
if os.path.exists(TOKEN_PATH):
View
6 src/lib/dropbox/api.json
@@ -1,6 +0,0 @@
-{
- "dropbox": {
- "key": "dysgzktky4zqbib",
- "secret": "46s2f1c7oc1aoxw"
- }
-}

0 comments on commit 7d5d20d

Please sign in to comment.