"""
This class does not do anything useful at runtime. Its only purpose is to provide type annotations.
Since sphinx does not support .pyi files (yet?), this is a .py file.
"""

from __future__ import annotations

from typing import TYPE_CHECKING

if TYPE_CHECKING:

    from typing import Iterable, List, Optional

    from authenticationservice_types import Login_Responses, Logout_Responses

    from sila2.client import ClientMetadataInstance


class AuthenticationServiceClient:
    """
    This Feature provides SiLA Clients with access tokens based on a user identification and password.
    1. the user needs to login with the Login command into the server with a user identification (=user name) and a password
    2. after verification, an Access Token with the Token Lifetime information will be generated and provided by the server.
    3. the user can log-out from the server with the Logout command - a valid Access Token is required to run this command.
    """

    def Login(
        self,
        UserIdentification: str,
        Password: str,
        RequestedServer: str,
        RequestedFeatures: List[str],
        *,
        metadata: Optional[Iterable[ClientMetadataInstance]] = None,
    ) -> Login_Responses:
        """
        Provides an access token based on user information.
        """
        ...

    def Logout(
        self, AccessToken: str, *, metadata: Optional[Iterable[ClientMetadataInstance]] = None
    ) -> Logout_Responses:
        """
        Invalidates the given access token immediately.
        """
        ...
