Skip to content

Commit

Permalink
WIP oie implementation, oauth2 only, authorization code flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
sevignyj committed Sep 23, 2023
1 parent 45703a5 commit bba74dc
Show file tree
Hide file tree
Showing 7 changed files with 441 additions and 105 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ venv/
ENV/
env.bak/
venv.bak/
.vscode/

# Spyder project settings
.spyderproject
Expand Down
13 changes: 13 additions & 0 deletions tokendito/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
from os.path import expanduser
import sys
import requests

from platformdirs import user_config_dir

Expand Down Expand Up @@ -53,6 +54,7 @@ class Config(object):
password="",
mfa=None,
mfa_response=None,
oauth_client_id=None,
tile=None,
org=None,
),
Expand Down Expand Up @@ -132,3 +134,14 @@ def get_defaults(self):


config = Config()


session = requests.Session()
session.headers.update(
{
"User-Agent": f"tokendito/{__version__}",
"content-type": "application/json",
"accept": "application/json",
}
)

2 changes: 1 addition & 1 deletion tokendito/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def main(args=None): # needed for console script

path = os.path.dirname(os.path.dirname(__file__))
sys.path[0:0] = [path]
from tokendito.tool import cli
from tokendito.user import cli

try:
return cli(args)
Expand Down
Loading

0 comments on commit bba74dc

Please sign in to comment.