PamContext: QtObject
import Quickshell.Services.Pam
Connection to pam. More
Properties
- active: bool
- config: string
- configDirectory: string
- message: string
- messageIsError: bool
- responseRequired: bool
- responseVisible: bool
- user: string
Functions
Signals
- completed(result: PamResult)
- error(error: PamError)
- pamMessage()
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.
message: string
The last message sent by pam.
messageIsError: bool
If the last message should be shown as an error.
responseRequired: bool
If pam currently wants a response.
Responses can be returned with the respond() function.
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.
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
.