Implement command-based echo app and HTTP handler
This commit is contained in:
parent
07036afafa
commit
b6b58fe2b3
6 changed files with 190 additions and 7 deletions
17
keystore.go
Normal file
17
keystore.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue