phosphor-shell-polkit

PolicyKit authentication prompt attached to the requesting window.

The Phosphor.Polkit QML module draws the prompt for the session's PolicyKit agent. PolkitPrompt is a 360 px card hanging under a 2 px rose band across the requesting window's top edge, with the request's message, the requester and action id, a password field, and Cancel and Authenticate actions. PolkitAnchor finds that window by looking up the requester's pid through a window tracker and its rect through the screen's placement map; when any link is missing the prompt falls back to the screen edge. PolkitDim dims everything except the requesting window while a request is open. The agent itself is phosphor-service-polkit. This module only draws for it, duck-typing the agent's respond() and cancel() so tests can use a fake, and the response goes straight to the agent and is cleared from the field at once.

Full API →

Key types

PolkitPrompt
The band and card: message, requester, action id, password field, and actions.
PolkitAnchor
Resolves the requesting window's rect from its pid and the placement map.
PolkitDim
20 % dim of the screen with a hole left clear for the requester.
PolkitAction
Text action with a 2 px underline, used for Cancel and Authenticate.

Dependencies

See also

References