Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for new v2/token endpoints #1413

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/python/src/bailo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import logging

# Package Version 2.5.0
__version__ = "2.5.0"
# Package Version 2.5.1
__version__ = "2.5.1"


from bailo.core.agent import Agent, PkiAgent, TokenAgent
Expand Down
5 changes: 5 additions & 0 deletions lib/python/src/bailo/core/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,21 @@ def __init__(
self.basic = HTTPBasicAuth(access_key, secret_key)

def get(self, *args, **kwargs):
args[0] = args[0].replace("v2", "v2/token")
return super().get(*args, auth=self.basic, **kwargs)

def post(self, *args, **kwargs):
args[0] = args[0].replace("v2", "v2/token")
return super().post(*args, auth=self.basic, **kwargs)

def put(self, *args, **kwargs):
args[0] = args[0].replace("v2", "v2/token")
return super().put(*args, auth=self.basic, **kwargs)

def patch(self, *args, **kwargs):
args[0] = args[0].replace("v2", "v2/token")
return super().patch(*args, auth=self.basic, **kwargs)

def delete(self, *args, **kwargs):
args[0] = args[0].replace("v2", "v2/token")
return super().delete(*args, auth=self.basic, **kwargs)
Loading