Skip to content

Commit

Permalink
Use authentication.file to set secrets file
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Jul 2, 2024
1 parent b473e7e commit 0e8b7dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/zino/api/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from zino import version
from zino.api import auth
from zino.api.notify import Zino1NotificationProtocol
from zino.state import ZinoState
from zino.state import ZinoState, config
from zino.statemodels import ClosedEventError, Event, EventState

if TYPE_CHECKING:
Expand All @@ -38,7 +38,7 @@ def __init__(
self,
server: Optional["ZinoServer"] = None,
state: Optional[ZinoState] = None,
secrets_file: Optional[Union[Path, str]] = "secrets",
secrets_file: Optional[Union[Path, str]] = None,
):
"""Initializes a protocol instance.
Expand All @@ -58,7 +58,7 @@ def __init__(
self._authentication_challenge: Optional[str] = None

self._state = state if state is not None else ZinoState()
self._secrets_file = secrets_file
self._secrets_file = secrets_file or config.authentication.file

@property
def peer_name(self) -> Optional[str]:
Expand Down

0 comments on commit 0e8b7dc

Please sign in to comment.