Implement command-based echo app and HTTP handler

This commit is contained in:
Barak Michener 2020-09-24 14:19:31 -07:00
parent 07036afafa
commit b6b58fe2b3
6 changed files with 190 additions and 7 deletions

17
keystore.go Normal file
View file

@ -0,0 +1,17 @@
package ussher
import "golang.org/x/crypto/ssh"
type Keystore interface {
CheckPublicKey(user string, key ssh.PublicKey) (*ssh.Permissions, error)
}
func AcceptAllKeys() *allKeyAcceptor {
return &allKeyAcceptor{}
}
type allKeyAcceptor struct{}
func (all *allKeyAcceptor) CheckPublicKey(user string, key ssh.PublicKey) (*ssh.Permissions, error) {
return nil, nil
}