credential

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DomainName added in v1.1.0

func DomainName(un string) string

DomainName function returns the domain name from the user name.

Types

type CCache added in v1.1.1

type CCache interface {
	Credential
	// CCache.
	CCache() *credentials.CCache
}

func NewFromCCache added in v1.1.1

func NewFromCCache(un string, ccache *credentials.CCache, opts ...Option) CCache

type Credential

type Credential interface {
	// User name.
	UserName() string
	// Domain name.
	DomainName() string
	// Workstation.
	Workstation() string
}

Generic credential.

type Keytab

type Keytab interface {
	Credential
	// Keytab.
	Keytab() *keytab.Keytab
}

func NewFromKeytab added in v1.1.0

func NewFromKeytab(un string, keytab *keytab.Keytab, opts ...Option) Keytab

NewFromKeytab ...

func NewFromKeytabFile added in v1.1.0

func NewFromKeytabFile(un string, keytabFile string, opts ...Option) Keytab

NewFromKeytabFile ...

type NTHash added in v1.0.1

type NTHash interface {
	// Credential. (UserName / DomainName).
	Credential
	// NT Hash.
	NTHash() []byte
	// KVNO. (optional for KRB5).
	KVNO() int
}

func NewFromNTHash added in v1.0.1

func NewFromNTHash(un, hash string, opts ...Option) NTHash

NewFromNTHash function returns the NT Hash credentials using the NT hash string (hex-encoded MD4 of the password).

func NewFromNTHashBytes added in v1.0.1

func NewFromNTHashBytes(un string, hash []byte, opts ...Option) NTHash

NewFromNTHashBytes function returns the username/hash credential.

type Option added in v1.0.3

type Option interface {
	// contains filtered or unexported methods
}

func KVNO added in v1.0.3

func KVNO(i int) Option

KVNO option.

func Workstation added in v1.0.3

func Workstation(s string) Option

Workstation option.

type Password

type Password interface {
	// Credential. (UserName / DomainName).
	Credential
	// Password.
	Password() string
}

Password credential.

func Anonymous added in v1.0.2

func Anonymous() Password

Anonymous function returns the anonymous password credentials.

func NewFromPassword

func NewFromPassword(un, passwd string, opts ...Option) Password

NewFromPassword function returns the username/password credential.

func NewFromString

func NewFromString(s string) Password

Jump to

Keyboard shortcuts

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