osauth

package
v0.12.5-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPasswdFilename = "/etc/passwd"
View Source
var DefaultShadowFilename = "/etc/shadow"

Functions

func AuthUser

func AuthUser(username, passwd string) bool

func VerifyPasswordHash

func VerifyPasswordHash(hashPassword, passwd string) bool

Types

type ShadowEntry

type ShadowEntry struct {
	Username    string // Login name
	Password    string // Hashed password
	Lastchanged int    // Days since Jan 1, 1970 that password was last changed
	Minimum     int    // The minimum number of days required between password changes i.e. the number of days left before the user is allowed to change his/her password
	Maximum     int    // The maximum number of days the password is valid (after that user is forced to change his/her password)
	Warn        int    // The number of days before password is to expire that user is warned that his/her password must be changed
	Inactive    int    // The number of days after password expires that account is disabled
	Expire      int    // Days since Jan 1, 1970 that account is disabled i.e. an absolute date specifying when the login may no longer be used.
}

type User

type User struct {
	UID      uint32
	GID      uint32
	Username string
	Password string
	Name     string
	HomeDir  string
	Shell    string
}

func LookupUser

func LookupUser(username string) *User

Jump to

Keyboard shortcuts

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