Mercurial > crates > nonstick
comparison src/pam_ffi/message.rs @ 72:47eb242a4f88
Fill out the PamHandle trait.
This updates the PamHandle trait to have methods for each Item,
and implements them on the LibPamHandle.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Wed, 04 Jun 2025 03:53:36 -0400 |
parents | 58f9d2a4df38 |
children | ac6881304c78 |
comparison
equal
deleted
inserted
replaced
71:58f9d2a4df38 | 72:47eb242a4f88 |
---|---|
16 /// that will be presented to the user. | 16 /// that will be presented to the user. |
17 #[derive(Debug)] | 17 #[derive(Debug)] |
18 pub enum Message<'a> { | 18 pub enum Message<'a> { |
19 /// Requests information from the user; will be masked when typing. | 19 /// Requests information from the user; will be masked when typing. |
20 /// | 20 /// |
21 /// Response: [`Response::MaskedText`] | 21 /// Response: [`MaskedText`](crate::conv::Response::MaskedText) |
22 MaskedPrompt(&'a str), | 22 MaskedPrompt(&'a str), |
23 /// Requests information from the user; will not be masked. | 23 /// Requests information from the user; will not be masked. |
24 /// | 24 /// |
25 /// Response: [`Response::Text`] | 25 /// Response: [`Text`](crate::conv::Response::Text) |
26 Prompt(&'a str), | 26 Prompt(&'a str), |
27 /// "Yes/No/Maybe conditionals" (a Linux-PAM extension). | 27 /// "Yes/No/Maybe conditionals" (a Linux-PAM extension). |
28 /// | 28 /// |
29 /// Response: [`Response::Text`] | 29 /// Response: [`Text`](crate::conv::Response::Text) |
30 /// (Linux-PAM documentation doesn't define its contents.) | 30 /// (Linux-PAM documentation doesn't define its contents.) |
31 RadioPrompt(&'a str), | 31 RadioPrompt(&'a str), |
32 /// Raises an error message to the user. | 32 /// Raises an error message to the user. |
33 /// | 33 /// |
34 /// Response: [`Response::NoResponse`] | 34 /// Response: [`NoResponse`](crate::conv::Response::NoResponse) |
35 Error(&'a str), | 35 Error(&'a str), |
36 /// Sends an informational message to the user. | 36 /// Sends an informational message to the user. |
37 /// | 37 /// |
38 /// Response: [`Response::NoResponse`] | 38 /// Response: [`NoResponse`](crate::conv::Response::NoResponse) |
39 Info(&'a str), | 39 Info(&'a str), |
40 /// Requests binary data from the client (a Linux-PAM extension). | 40 /// Requests binary data from the client (a Linux-PAM extension). |
41 /// | 41 /// |
42 /// This is used for non-human or non-keyboard prompts (security key?). | 42 /// This is used for non-human or non-keyboard prompts (security key?). |
43 /// NOT part of the X/Open PAM specification. | 43 /// NOT part of the X/Open PAM specification. |
44 /// | 44 /// |
45 /// Response: [`Response::Binary`] | 45 /// Response: [`Binary`](crate::conv::Response::Binary) |
46 BinaryPrompt { | 46 BinaryPrompt { |
47 /// Some binary data. | 47 /// Some binary data. |
48 data: &'a [u8], | 48 data: &'a [u8], |
49 /// A "type" that you can use for signalling. Has no strict definition in PAM. | 49 /// A "type" that you can use for signalling. Has no strict definition in PAM. |
50 data_type: u8, | 50 data_type: u8, |