PamContext: QtObject

import Quickshell.Services.Pam

Connection to pam. More

Properties

Functions

Signals

Detailed Description

Connection to pam. See the module documentation for pam configuration advice.

Property Details

active: bool

If the pam context is actively performing an authentication.

Setting this value behaves exactly the same as calling start() and abort().

config: string

The pam configuration to use. Defaults to “login”.

The configuration should name a file inside configDirectory.

This property may not be set while active is true.

configDirectory: string

The pam configuration directory to use. Defaults to “/etc/pam.d”.

The configuration directory is resolved relative to the current file if not an absolute path.

This property may not be set while active is true.

[readonly]

message: string

The last message sent by pam.

[readonly]

messageIsError: bool

If the last message should be shown as an error.

[readonly]

responseRequired: bool

If pam currently wants a response.

Responses can be returned with the respond() function.

[readonly]

responseVisible: bool

If the user’s response should be visible. Only valid when responseRequired is true.

user: string

The user to authenticate as. If unset the current user will be used.

This property may not be set while active is true.

Function Details

void abort()

Abort a running authentication session.

void respond(response: string)

Respond to pam.

May not be called unless responseRequired is true.

bool start()

Start an authentication session. Returns if the session was started successfully.

Signal Details

completed(result: PamResult)

Emitted whenever authentication completes.

error(error: PamError)

Emitted if pam fails to perform authentication normally.

A completed(PamResult.Error) will be emitted after this event.

pamMessage()

Emitted whenever pam sends a new message, after the change signals for message, messageIsError, and responseRequired.