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 Oct 18, 2023
1 parent 8084d45 commit 4df1952
Show file tree
Hide file tree
Showing 10 changed files with 436 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
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
beautifulsoup4>=4.6.0
botocore>=1.12.36
certifi>=2022.12.07 # This can be removed when requests updates its requirements from 2017.4.17 to >=2022.12.07
platformdirs>=2.5.4
requests>=2.19.0
16 changes: 14 additions & 2 deletions tokendito/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
# vim: set filetype=python ts=4 sw=4
# -*- coding: utf-8 -*-
"""Tokendito module initialization."""
__version__ = "2.1.2"
"""tokendito module initialization."""

from requests import Session

__version__ = "2.2.0.rc1"
__title__ = "tokendito"
__description__ = "Get AWS STS tokens from Okta SSO"
__long_description_content_type__ = "text/markdown"
__url__ = "https://github.com/dowjones/tokendito"
__author__ = "tokendito"
__author_email__ = "[email protected]"
__license__ = "Apache 2.0"

Session = Session()
Session.headers.update(
{
"User-Agent": f"tokendito/{__version__}",
"content-type": "application/json",
"accept": "application/json",
}
)
4 changes: 2 additions & 2 deletions tokendito/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ 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 cmd_interface

try:
return cli(args)
return cmd_interface(args)
except KeyboardInterrupt:
print("\nInterrupted")
sys.exit(1)
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
1 change: 1 addition & 0 deletions tokendito/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Config(object):
password="",
mfa=None,
mfa_response=None,
oauth_client_id=None,
tile=None,
org=None,
),
Expand Down
Loading

0 comments on commit 4df1952

Please sign in to comment.