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 25, 2023
1 parent 45703a5 commit 01b4b82
Show file tree
Hide file tree
Showing 8 changed files with 439 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: 12 additions & 1 deletion tokendito/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
import os
from os.path import expanduser
import sys
from requests import Session

from platformdirs import user_config_dir

__version__ = "2.1.2"
__version__ = "2.2.0"
__title__ = "tokendito"
__description__ = "Get AWS STS tokens from Okta SSO"
__long_description_content_type__ = "text/markdown"
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,12 @@ def get_defaults(self):


config = Config()
Session = 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
2 changes: 1 addition & 1 deletion tokendito/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get_output_types():
return ["json", "text", "csv", "yaml", "yaml-stream"]


def authenticate_to_roles(urls, cookies=None):
def authenticate_to_roles(urls, cookies):
"""Authenticate AWS user with saml.
:param urls: list of tuples or tuple, with tiles info
Expand Down
Loading

0 comments on commit 01b4b82

Please sign in to comment.