Documentation
¶
Overview ¶
Package adapter is the package for the PAM library
Index ¶
- func AutoSelectForUser(client authd.PAMClient, username string) tea.Cmd
- func IsSSHSession(mTx pam.ModuleTransaction) bool
- func TeaHeadlessOptions() ([]tea.ProgramOption, error)
- type AuthModeSelected
- type BrokerListReceived
- type BrokerSelected
- type ChangeStage
- type GetAuthenticationModesRequested
- type PamClientType
- type PamIgnore
- type PamReturnError
- type PamReturnStatus
- type PamSuccess
- type SessionEnded
- type SessionStarted
- type UILayoutReceived
- type UIModel
- type UsernameSelected
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoSelectForUser ¶
AutoSelectForUser requests if any previous broker was used by this user to automatically selects it.
func IsSSHSession ¶
func IsSSHSession(mTx pam.ModuleTransaction) bool
IsSSHSession checks if the module transaction is currently handling a SSH session.
func TeaHeadlessOptions ¶
func TeaHeadlessOptions() ([]tea.ProgramOption, error)
TeaHeadlessOptions gets the options to run a bubbletea program in headless mode.
Types ¶
type AuthModeSelected ¶
type AuthModeSelected struct {
ID string
}
AuthModeSelected is triggered when the authentication mode has been chosen.
type BrokerListReceived ¶
type BrokerListReceived struct{}
BrokerListReceived is received when we got the broker list.
type BrokerSelected ¶
type BrokerSelected struct {
BrokerID string
}
BrokerSelected signifies that the broker has been chosen.
type ChangeStage ¶
ChangeStage signals that the model requires a stage change.
type GetAuthenticationModesRequested ¶
type GetAuthenticationModesRequested struct{}
GetAuthenticationModesRequested signals that a model needs to get the broker authentication modes.
type PamClientType ¶
type PamClientType int
PamClientType indicates the type of the PAM client we're handling.
const ( // Native indicates a PAM Client that is not supporting any special protocol. Native PamClientType = iota // InteractiveTerminal indicates an interactive terminal we can directly write our interface to. InteractiveTerminal // Gdm is a gnome-shell client via GDM display manager. Gdm )
type PamIgnore ¶
type PamIgnore struct {
LocalBrokerID string // Only set for local broker to store it globally.
// contains filtered or unexported fields
}
PamIgnore signals PAM module to return pam.Ignore and Quit tea.Model.
type PamReturnError ¶
type PamReturnError interface {
PamReturnStatus
Status() pam.Error
}
PamReturnError is an interface that PAM errors return types should implement.
type PamReturnStatus ¶
type PamReturnStatus interface {
Message() string
}
PamReturnStatus is the interface that all PAM return types should implement.
type PamSuccess ¶
type PamSuccess struct {
BrokerID string
// contains filtered or unexported fields
}
PamSuccess signals PAM module to return with provided pam.Success and Quit tea.Model.
func (PamSuccess) Message ¶
func (p PamSuccess) Message() string
Message returns the message that should be sent to pam as info message.
type SessionEnded ¶
type SessionEnded struct{}
SessionEnded signals that the session is done and closed from the broker.
type SessionStarted ¶
type SessionStarted struct {
// contains filtered or unexported fields
}
SessionStarted signals that we started a session with a given broker.
type UILayoutReceived ¶
type UILayoutReceived struct {
// contains filtered or unexported fields
}
UILayoutReceived means that we got the ui layout to display by the broker.
type UIModel ¶
type UIModel struct {
// PamMTx is the [pam.ModuleTransaction] used to communicate with PAM.
PamMTx pam.ModuleTransaction
// Client is the [authd.PAMClient] handle used to communicate with authd.
Client authd.PAMClient
// NssClient is the [authd.NSSClient] handle used to communicate with authd.
NssClient authd.NSSClient
// PamClientType is the kind of the PAM client we're handling.
ClientType PamClientType
// SessionMode is the mode of the session invoked by the module.
SessionMode authd.SessionMode
// contains filtered or unexported fields
}
UIModel is the global models orchestrator.
func (*UIModel) ExitStatus ¶
func (m *UIModel) ExitStatus() PamReturnStatus
ExitStatus exposes the PamReturnStatus externally.
type UsernameSelected ¶
type UsernameSelected struct{}
UsernameSelected is received when the user name is filled (from pam or manually).