testing #14

Merged
pi-ux-ce merged 21 commits from testing into main 2026-06-25 21:24:16 +00:00
2 changed files with 6 additions and 16 deletions
Showing only changes of commit f78ffcc595 - Show all commits
+6 -16
View File
@@ -24,23 +24,13 @@ class bitwardenUtils():
logging.basicConfig(level=logging.DEBUG)
def __init__(self, access_token, organization_id):
self.access_token = access_token
self.organization_id = organization_id
client = BitwardenClient(
client_settings_from_dict(
{
"apiUrl": os.getenv("API_URL", "https://bitwarden.tryton.geeraert.eu/api"),
"deviceType": DeviceType.SDK,
"identityUrl": os.getenv("IDENTITY_URL", "https://bitwarden.tryton.geeraert.eu/identity"),
"userAgent": "Python",
}
)
)
self.client.auth().login_access_token(self.access_token, self.state_path)
def __init__(self, __access_token, __organization_id):
self.__access_token = __access_token
self.__organization_id = __organization_id
self.client.auth().login_access_token(self.__access_token, self.state_path)
def create_project(self,project_name):
project = self.client.projects().create(self.organization_id, project_name)
project = self.client.projects().create(self.__organization_id, project_name)
return project.data.id
def generate_strong_password(self):
@@ -49,7 +39,7 @@ class bitwardenUtils():
def create_secret(self,project_id,secret_name,secret_value,description="description"):
secret = self.client.secrets().create(
self.organization_id,
self.__organization_id,
secret_name,
secret_value,
description,