Auth Functions

class ai.backend.client.auth.Auth[source]

Provides the function interface for login session management and authorization.

classmethod await login(user_id, password)[source]

Log-in into the endpoint with the given user ID and password. It creates a server-side web session and return a dictionary with "authenticated" boolean field and JSON-encoded raw cookie data.

Return type

dict

classmethod await logout()[source]

Log-out from the endpoint. It clears the server-side web session.

Return type

None