-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added password storage and retrieval
- Loading branch information
1 parent
e6afa9c
commit 0670299
Showing
4 changed files
with
57 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import keyring | ||
|
||
class Auth: | ||
@staticmethod | ||
def getCredential(app, username): | ||
return keyring.get_credential(app, username) | ||
|
||
@staticmethod | ||
def getPassword(app, username): | ||
return keyring.get_password(app, username) | ||
|
||
@staticmethod | ||
def setPassword(app, username, password): | ||
keyring.set_password(app, username, password) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
INSTAGRAM = "instagram" | ||
TWITTER = "twitter" | ||
class AppConstant: | ||
INSTAGRAM = "instagram" | ||
TWITTER = "twitter" | ||
|
||
APP_INPUT_MAP = { | ||
"instagram": INSTAGRAM, | ||
"i": INSTAGRAM, | ||
"twitter": TWITTER, | ||
"t": TWITTER | ||
"instagram": AppConstant.INSTAGRAM, | ||
"i": AppConstant.INSTAGRAM, | ||
"twitter": AppConstant.TWITTER, | ||
"t": AppConstant.TWITTER | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters