diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-12-26 21:59:37 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-12-26 21:59:37 +0100 |
commit | a229cb46763cb4a1be1a0e3b6d93e6e0d106561d (patch) | |
tree | 15ef2b43daac6c125bc12f9badb0b03681910efc /include/libssh/auth.h | |
parent | 682ed1812364bd42fef6f331486c5d8f5a72ef21 (diff) | |
download | libssh-a229cb46763cb4a1be1a0e3b6d93e6e0d106561d.tar.gz libssh-a229cb46763cb4a1be1a0e3b6d93e6e0d106561d.tar.xz libssh-a229cb46763cb4a1be1a0e3b6d93e6e0d106561d.zip |
Asynchronous authentication works !
Diffstat (limited to 'include/libssh/auth.h')
-rw-r--r-- | include/libssh/auth.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/include/libssh/auth.h b/include/libssh/auth.h index 86b31ea4..f78a3f2b 100644 --- a/include/libssh/auth.h +++ b/include/libssh/auth.h @@ -22,7 +22,47 @@ #ifndef AUTH_H_ #define AUTH_H_ #include "libssh/callbacks.h" + SSH_PACKET_CALLBACK(ssh_packet_userauth_banner); +SSH_PACKET_CALLBACK(ssh_packet_userauth_failure); +SSH_PACKET_CALLBACK(ssh_packet_userauth_success); +SSH_PACKET_CALLBACK(ssh_packet_userauth_pk_ok); + + +/** @internal + * States of authentication in the client-side. They describe + * what was the last response from the server + */ +enum ssh_auth_state_e { + /** No authentication asked */ + SSH_AUTH_STATE_NONE=0, + /** Last authentication response was a partial success */ + SSH_AUTH_STATE_PARTIAL, + /** Last authentication response was a success */ + SSH_AUTH_STATE_SUCCESS, + /** Last authentication response was failed */ + SSH_AUTH_STATE_FAILED, + /** Last authentication was erroneous */ + SSH_AUTH_STATE_ERROR, + /** Last state was a keyboard-interactive ask for info */ + SSH_AUTH_STATE_INFO, + /** Last state was a public key accepted for authentication */ + SSH_AUTH_STATE_PK_OK + +}; +/** @internal + * @brief states of the authentication service request + */ +enum ssh_auth_service_state_e { + /** initial state */ + SSH_AUTH_SERVICE_NONE=0, + /** Authentication service request packet sent */ + SSH_AUTH_SERVICE_SENT, + /** Service accepted */ + SSH_AUTH_SERVICE_ACCEPTED, + /** Access to service denied (fatal) */ + SSH_AUTH_SERVICE_DENIED +}; #endif /* AUTH_H_ */ |