55#include "strvec.h"
66
77/**
8- * The credentials API provides an abstracted way of gathering username and
9- * password credentials from the user.
8+ * The credentials API provides an abstracted way of gathering
9+ * authentication credentials from the user.
1010 *
1111 * Typical setup
1212 * -------------
@@ -116,11 +116,12 @@ struct credential_capability {
116116};
117117
118118/**
119- * This struct represents a single username/password combination
120- * along with any associated context. All string fields should be
121- * heap-allocated (or NULL if they are not known or not applicable).
122- * The meaning of the individual context fields is the same as
123- * their counterparts in the helper protocol.
119+ * This struct represents a single login credential (typically a
120+ * username/password combination) along with any associated
121+ * context. All string fields should be heap-allocated (or NULL if
122+ * they are not known or not applicable). The meaning of the
123+ * individual context fields is the same as their counterparts in
124+ * the helper protocol.
124125 *
125126 * This struct should always be initialized with `CREDENTIAL_INIT` or
126127 * `credential_init`.
@@ -207,11 +208,12 @@ void credential_clear(struct credential *);
207208
208209/**
209210 * Instruct the credential subsystem to fill the username and
210- * password fields of the passed credential struct by first
211- * consulting helpers, then asking the user. After this function
212- * returns, the username and password fields of the credential are
213- * guaranteed to be non-NULL. If an error occurs, the function will
214- * die().
211+ * password (or authtype and credential) fields of the passed
212+ * credential struct by first consulting helpers, then asking the
213+ * user. After this function returns, either the username and
214+ * password fields or the credential field of the credential are
215+ * guaranteed to be non-NULL. If an error occurs, the function
216+ * will die().
215217 *
216218 * If all_capabilities is set, this is an internal user that is prepared
217219 * to deal with all known capabilities, and we should advertise that fact.
@@ -232,10 +234,10 @@ void credential_approve(struct credential *);
232234 * have been rejected. This will cause the credential subsystem to
233235 * notify any helpers of the rejection (which allows them, for
234236 * example, to purge the invalid credentials from storage). It
235- * will also free() the username and password fields of the
236- * credential and set them to NULL (readying the credential for
237- * another call to `credential_fill`). Any errors from helpers are
238- * ignored.
237+ * will also free() the username, password, and credential fields
238+ * of the credential and set them to NULL (readying the credential
239+ * for another call to `credential_fill`). Any errors from helpers
240+ * are ignored.
239241 */
240242void credential_reject (struct credential * );
241243
0 commit comments