@@ -77,44 +77,73 @@ typedef struct {
7777 *** Begin interface for credentials acquisition ***
7878 */
7979
80- /** Authentication type requested */
80+ /**
81+ * Supported credential types
82+ *
83+ * This represents the various types of authentication methods supported by
84+ * the library.
85+ */
8186typedef enum {
82- /* git_cred_userpass_plaintext */
87+ /**
88+ * A vanilla user/password request
89+ * @see git_cred_userpass_plaintext_new
90+ */
8391 GIT_CREDTYPE_USERPASS_PLAINTEXT = (1u << 0 ),
8492
85- /* git_cred_ssh_key */
93+ /**
94+ * An SSH key-based authentication request
95+ * @see git_cred_ssh_key_new
96+ */
8697 GIT_CREDTYPE_SSH_KEY = (1u << 1 ),
8798
88- /* git_cred_ssh_custom */
99+ /**
100+ * An SSH key-based authentication request, with a custom signature
101+ * @see git_cred_ssh_custom_new
102+ */
89103 GIT_CREDTYPE_SSH_CUSTOM = (1u << 2 ),
90104
91- /* git_cred_default */
105+ /**
106+ * An NTLM/Negotiate-based authentication request.
107+ * @see git_cred_default
108+ */
92109 GIT_CREDTYPE_DEFAULT = (1u << 3 ),
93110
94- /* git_cred_ssh_interactive */
111+ /**
112+ * An SSH interactive authentication request
113+ * @see git_cred_ssh_interactive_new
114+ */
95115 GIT_CREDTYPE_SSH_INTERACTIVE = (1u << 4 ),
96116
97117 /**
98- * Username-only information
118+ * Username-only authentication request
99119 *
100- * If the SSH transport does not know which username to use,
101- * it will ask via this credential type.
120+ * Used as a pre-authentication step if the underlying transport
121+ * (eg. SSH, with no username in its URL) does not know which username
122+ * to use.
123+ *
124+ * @see git_cred_username_new
102125 */
103126 GIT_CREDTYPE_USERNAME = (1u << 5 ),
104127
105128 /**
106- * Credentials read from memory.
129+ * An SSH key-based authentication request
130+ *
131+ * Allows credentials to be read from memory instead of files.
132+ * Note that because of differences in crypto backend support, it might
133+ * not be functional.
107134 *
108- * Only available for libssh2+OpenSSL for now.
135+ * @see git_cred_ssh_key_memory_new
109136 */
110137 GIT_CREDTYPE_SSH_MEMORY = (1u << 6 ),
111138} git_credtype_t ;
112139
113- /* The base structure for all credential types */
114140typedef struct git_cred git_cred ;
115141
142+ /**
143+ * The base structure for all credential types
144+ */
116145struct git_cred {
117- git_credtype_t credtype ;
146+ git_credtype_t credtype ; /**< A type of credential */
118147 void (* free )(git_cred * cred );
119148};
120149
0 commit comments