Ensure user information is available in KeyboardInteractive callback
Fixes #116
This commit is contained in:
parent
5b6cc7030f
commit
866d0ddf79
@ -130,6 +130,7 @@ func (srv *Server) config(ctx Context) *gossh.ServerConfig {
|
||||
}
|
||||
if srv.KeyboardInteractiveHandler != nil {
|
||||
config.KeyboardInteractiveCallback = func(conn gossh.ConnMetadata, challenger gossh.KeyboardInteractiveChallenge) (*gossh.Permissions, error) {
|
||||
applyConnMetadata(ctx, conn)
|
||||
if ok := srv.KeyboardInteractiveHandler(ctx, challenger); !ok {
|
||||
return ctx.Permissions().Permissions, fmt.Errorf("permission denied")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user