Skip to content

Auth

ptnad.auth.AuthStrategy

Bases: ABC

ptnad.auth.LocalAuth

LocalAuth(username: str, password: str)

Bases: AuthStrategy

Source code in src/ptnad/auth.py
def __init__(self, username: str, password: str) -> None:
    self.username = username
    self.password = password

ptnad.auth.SSOAuth

SSOAuth(sso_url: str, client_id: str, client_secret: str, username: str, password: str, sso_type: str | None = None)

Bases: AuthStrategy

Source code in src/ptnad/auth.py
def __init__(
    self,
    sso_url: str,
    client_id: str,
    client_secret: str,
    username: str,
    password: str,
    sso_type: str | None = None
) -> None:
    self.sso_url = sso_url
    self.client_id = client_id
    self.client_secret = client_secret
    self.username = username
    self.password = password
    self.sso_type = sso_type

ptnad.auth.Auth

Auth(client: Any)
Source code in src/ptnad/auth.py
def __init__(self, client: Any) -> None:
    self.client = client
    self.strategy: AuthStrategy | None = None