pam

package
v0.0.0-...-718ff87 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MessageEchoOff is for messages that shouldn't gave an echo.
	MessageEchoOff = MessageStyle(C.PAM_PROMPT_ECHO_OFF)

	// MessageEchoOn is for messages that should have an echo.
	MessageEchoOn = MessageStyle(C.PAM_PROMPT_ECHO_ON)

	// MessageErrorMsg is for messages that should be displayed as an error.
	MessageErrorMsg = MessageStyle(C.PAM_ERROR_MSG)

	// MessageTextInfo is for textual blurbs to be spat out.
	MessageTextInfo = MessageStyle(C.PAM_TEXT_INFO)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

type Handle struct {
	Ptr unsafe.Pointer
}

Handle is a handle type to hang the PAM methods off of.

func (Handle) Conversation

func (hdl Handle) Conversation(_msgs ...Message) ([]string, error)

Conversation passes on the specified messages.

func (Handle) GetModuleData

func (hdl Handle) GetModuleData(name string) (interface{}, error)

GetModuleData gets the specified module data.

func (Handle) GetUser

func (hdl Handle) GetUser() (string, error)

GetUser maps to the pam_get_user call, and returns the user that we're trying to auth as.

func (Handle) SetModuleData

func (hdl Handle) SetModuleData(name string, data interface{}) error

SetModuleData sets the speciified module data.

type Message

type Message struct {
	Style MessageStyle
	Msg   string
}

Message represents something to ask / show in a Conv.Conversation call.

type MessageStyle

type MessageStyle int

MessageStyle is a style of Message

Jump to

Keyboard shortcuts

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