From 5ec7d5e34b0c63d42afbdb8ac04eb47b0fac1f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Michel?= Date: Thu, 1 Aug 2024 14:11:06 +0000 Subject: [PATCH] better doc --- auth/interface.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/auth/interface.go b/auth/interface.go index ad71b59..847fc60 100644 --- a/auth/interface.go +++ b/auth/interface.go @@ -10,7 +10,7 @@ import ( ) ///////////////////////////////////// -// Server auth plugins // +// Server auth plugins // ///////////////////////////////////// // In ssh3, authorized_keys are replaced by authorized_identities where a use can specify classical @@ -27,11 +27,15 @@ type RequestIdentityVerifier interface { type ServerAuthPlugin func(username string, identityStr string) (RequestIdentityVerifier, error) ///////////////////////////////////// -// Client auth plugins // +// Client auth plugins // ///////////////////////////////////// -// Updates `request` with the correct authentication material so that an SSH3 conversation -// can be established by performing the request +// returns all the suitable authentication methods to be tried against the server in the form +// of a slice of ClientAuthMethod. Every ClientAuthMethod will have the opportunity to prepare +// an HTTP request with authentication material to startup an SSH3 conversation. For instance, +// for pubkey authentication using the private key files on the filesystem, the +// GetClientAuthMethodsFunc can return a slice containing one ClientAuthMethod for +// each private key file it wants to try. // if no SSH agent socket if found, sshAgent is nil type GetClientAuthMethodsFunc func(request *http.Request, sshAgent agent.ExtendedAgent, clientConfig *client_config.Config, roundTripper *http3.RoundTripper) ([]ClientAuthMethod, error)