diff --git a/src/enerbitdso/VERSION b/src/enerbitdso/VERSION index 99a25fc..44a7df2 100644 --- a/src/enerbitdso/VERSION +++ b/src/enerbitdso/VERSION @@ -1 +1 @@ -0.1.16 \ No newline at end of file +0.1.17 \ No newline at end of file diff --git a/src/enerbitdso/enerbit.py b/src/enerbitdso/enerbit.py index e6e16d3..a075dbf 100644 --- a/src/enerbitdso/enerbit.py +++ b/src/enerbitdso/enerbit.py @@ -42,9 +42,9 @@ class ScheduleMeasurementRecord(pydantic.BaseModel): reactive_energy_exported: float -def get_auth_token(base_url, username, password): +def get_auth_token(base_url: str, username: str, password: pydantic.SecretStr) -> str: path = "/auth/token/" - data = {"username": username, "password": password} + data = {"username": username, "password": password.get_secret_value()} with httpx.Client(base_url=base_url, timeout=TIMEOUT, verify=SSL_CONTEXT) as client: response = client.post(path, data=data) try: