Registry / auth / msteinert-pam

msteinert-pam

JSON →
library1.2.0gogounverified

Package pam provides a wrapper for the PAM application API.

go get github.com/msteinert/pam
INSTALL
IMPORT
SIG · MSTEINERT-PAM
M
msteinert-pam
authgov1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pam
github.com/msteinert/pam

Authenticates a user via PAM.

package main import ( "fmt" "github.com/msteinert/pam" ) func main() { t, err := pam.StartFunc("", "username", func(s pam.Style, msg string) (string, error) { switch s { case pam.PromptEchoOff: return "password", nil case pam.PromptEchoOn: return "response", nil case pam.ErrorMsg: fmt.Println(msg) return "", nil case pam.TextInfo: fmt.Println(msg) return "", nil } return "", fmt.Errorf("unexpected style: %v", s) }) if err != nil { panic(err) } if err := t.Authenticate(0); err != nil { panic(err) } fmt.Println("Authenticated") }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
Resources
msteinert-pam — go get msteinert-pam · libregistry