auth

package
v0.0.0-...-6e4d8ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	PubKey(gossh.PublicKey) (string, bool)
	Password(user, password string) (string, bool)
}

type DefaultAuth

type DefaultAuth struct {
	// contains filtered or unexported fields
}

func New

func New(keys []*PubKeyAuth, pwd []*PasswordAuth) *DefaultAuth

func (*DefaultAuth) Password

func (d *DefaultAuth) Password(user, password string) (string, bool)

func (*DefaultAuth) PubKey

func (d *DefaultAuth) PubKey(key gossh.PublicKey) (string, bool)

type PasswordAuth

type PasswordAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Alias    string `json:"alias"`
}

type PubKeyAuth

type PubKeyAuth struct {
	PubKey string `json:"pubKey"`
	Alias  string `json:"alias"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL