aboutsummaryrefslogtreecommitdiff
path: root/include/libssh/callbacks.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libssh/callbacks.h')
-rw-r--r--include/libssh/callbacks.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/libssh/callbacks.h b/include/libssh/callbacks.h
index 45935206..5fb354f2 100644
--- a/include/libssh/callbacks.h
+++ b/include/libssh/callbacks.h
@@ -141,7 +141,7 @@ typedef int (*ssh_auth_password_callback) (ssh_session session, const char *user
void *userdata);
/**
- * @brief SSH Connection status callback. Tries to authenticates user with the "none" method
+ * @brief SSH authentication callback. Tries to authenticates user with the "none" method
* which is anonymous or passwordless.
* @param session Current session handler
* @param user User that wants to authenticate
@@ -152,6 +152,17 @@ typedef int (*ssh_auth_password_callback) (ssh_session session, const char *user
*/
typedef int (*ssh_auth_none_callback) (ssh_session session, const char *user, void *userdata);
+/**
+ * @brief SSH authentication callback. Tries to authenticates user with the "gssapi-with-mic" method
+ * @param session Current session handler
+ * @param user Authenticated login of the user, including realm.
+ * @param userdata Userdata to be passed to the callback function.
+ * @returns SSH_AUTH_OK Authentication is accepted.
+ * @returns SSH_AUTH_PARTIAL Partial authentication, more authentication means are needed.
+ * @returns SSH_AUTH_DENIED Authentication failed.
+ */
+typedef int (*ssh_auth_gssapi_mic_callback) (ssh_session session, const char *user, void *userdata);
+
/**
* @brief Handles an SSH service request
@@ -197,6 +208,10 @@ struct ssh_server_callbacks_struct {
*/
ssh_auth_none_callback auth_none_function;
+ /** This function gets called when a client tries to authenticate through
+ * gssapi-mic method.
+ */
+ ssh_auth_gssapi_mic_callback auth_gssapi_mic_function;
/** This functions gets called when a service request is issued by the
* client
*/