auth

package
v0.0.0-...-d433a87 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyUserStore

type DummyUserStore struct{}

func (*DummyUserStore) Get

func (us *DummyUserStore) Get(name string) (*User, error)

type LocalPublickKeyAuth

type LocalPublickKeyAuth struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewLocalPublicKeyAuth

func NewLocalPublicKeyAuth(file string) (*LocalPublickKeyAuth, error)

func (*LocalPublickKeyAuth) Auth

func (s *LocalPublickKeyAuth) Auth(ctx ssh.Context, key ssh.PublicKey) bool

type LocalUserStore

type LocalUserStore struct {
}

func (*LocalUserStore) Get

func (s *LocalUserStore) Get(name string) (*User, error)

type PamPasswordAuth

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

func NewPamPasswordAuth

func NewPamPasswordAuth(module string) *PamPasswordAuth

func (*PamPasswordAuth) Auth

func (a *PamPasswordAuth) Auth(ctx ssh.Context, password string) bool

type PasswordAuth

type PasswordAuth interface {
	Auth(ctx ssh.Context, password string) bool
}

type PublicKeyAuth

type PublicKeyAuth interface {
	Auth(ctx ssh.Context, key ssh.PublicKey) bool
}

type User

type User struct {
	Name  string
	UID   uint32
	GID   uint32
	Home  string
	Shell string
}

type UserStore

type UserStore interface {
	Get(name string) (*User, error)
}

Jump to

Keyboard shortcuts

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