Authenticator#

class ansys.solutions.dash_super_components.Authenticator(items: list[dict[str, Any]] | None = None, card_props: dict[str, Any] | None = None, aio_id: str | None = None)#

Bases: Div

A Dash component for crafting an authentication form.

Authenticator is based on the Dash All-in-One (AIO) component pattern. It renders a vertical stack of TextInput, PasswordInput, and Button items inside a dmc.Card.

When items is omitted or empty, a default form is rendered with a username text input (id "username"), a password input (id "password"), and a “Connect” button (id "connect").

Each item dict must contain the following keys:

  • "type" (required): "TextInput", "PasswordInput", or "Button".

  • "id" (required): unique string identifier for the item.

  • "properties" (required): dict of dash mantine component properties.

Parameters:
itemslist of dict, optional

Items to render in the form. Each dict must contain "type", "id", and "properties" keys. When omitted or empty, the default form (username, password, connect button) is rendered.

card_propsdict, optional

Properties forwarded to the wrapping dmc.Card.

aio_idstr, optional

Unique identifier for this component instance. A UUID is generated when not provided.

IDs

class ansys.solutions.dash_super_components.Authenticator.AuthenticatorIds#

Bases: AIOIds

Provides IDs for the subcomponents of Authenticator.

classmethod button(aio_id: str | Wildcard, item_id: str | Wildcard) → dict[str, Any]#

Return the id for a button item.

Parameters:
aio_idstr or _Wildcard

The component’s unique identifier.

item_idstr or _Wildcard

The unique identifier of the button item (item[“id”]).

Returns:
dict[str, Any]

The unique id dictionary for a button item of the Authenticator

classmethod input(aio_id: str | Wildcard, item_id: str | Wildcard) → dict[str, Any]#

Return the id for an input item.

Parameters:
aio_idstr or _Wildcard

The component’s unique identifier.

item_idstr or _Wildcard

The unique identifier of the input item (item[“id”]).

Returns:
dict[str, Any]

The unique id dictionary for an input item of the Authenticator

classmethod password(aio_id: str | Wildcard, item_id: str | Wildcard) → dict[str, Any]#

Return the id for a password item.

Parameters:
aio_idstr or _Wildcard

The component’s unique identifier.

item_idstr or _Wildcard

The unique identifier of the password item (item[“id”]).

Returns:
dict[str, Any]

The unique id dictionary for a password item of the Authenticator