Documentation
¶
Overview ¶
Package examplebroker implements an example broker that will be used by the authentication daemon.
Index ¶
- func StartBus(cfgPath string) (conn *dbus.Conn, err error)
- type Broker
- func (b *Broker) CancelIsAuthenticated(ctx context.Context, sessionID string)
- func (b *Broker) EndSession(ctx context.Context, sessionID string) error
- func (b *Broker) GetAuthenticationModes(ctx context.Context, sessionID string, supportedUILayouts []map[string]string) (authenticationModes []map[string]string, err error)
- func (b *Broker) IsAuthenticated(ctx context.Context, sessionID, authenticationData string) (access, data string, err error)
- func (b *Broker) NewSession(ctx context.Context, username, lang, mode string) (sessionID, encryptionKey string, err error)
- func (b *Broker) SelectAuthenticationMode(ctx context.Context, sessionID, authenticationModeName string) (uiLayoutInfo map[string]string, err error)
- func (b *Broker) UserPreCheck(ctx context.Context, username string) (string, error)
- type Bus
- func (b *Bus) CancelIsAuthenticated(sessionID string) (dbusErr *dbus.Error)
- func (b *Bus) EndSession(sessionID string) (dbusErr *dbus.Error)
- func (b *Bus) GetAuthenticationModes(sessionID string, supportedUILayouts []map[string]string) (authenticationModes []map[string]string, dbusErr *dbus.Error)
- func (b *Bus) IsAuthenticated(sessionID, authenticationData string) (access, data string, dbusErr *dbus.Error)
- func (b *Bus) NewSession(username, lang, mode string) (sessionID, encryptionKey string, dbusErr *dbus.Error)
- func (b *Bus) SelectAuthenticationMode(sessionID, authenticationModeName string) (uiLayoutInfo map[string]string, dbusErr *dbus.Error)
- func (b *Bus) UserPreCheck(username string) (userinfo string, dbusErr *dbus.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker represents an examplebroker object.
func (*Broker) CancelIsAuthenticated ¶
CancelIsAuthenticated cancels the IsAuthenticated request for the specified session. If there is no pending IsAuthenticated call for the session, this is a no-op.
func (*Broker) EndSession ¶
EndSession ends the requested session and triggers the necessary clean up steps, if any.
func (*Broker) GetAuthenticationModes ¶
func (b *Broker) GetAuthenticationModes(ctx context.Context, sessionID string, supportedUILayouts []map[string]string) (authenticationModes []map[string]string, err error)
GetAuthenticationModes returns the list of supported authentication modes for the selected broker depending on session info.
func (*Broker) IsAuthenticated ¶
func (b *Broker) IsAuthenticated(ctx context.Context, sessionID, authenticationData string) (access, data string, err error)
IsAuthenticated evaluates the provided authenticationData and returns the authentication status for the user.
func (*Broker) NewSession ¶
func (b *Broker) NewSession(ctx context.Context, username, lang, mode string) (sessionID, encryptionKey string, err error)
NewSession creates a new session for the specified user.
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus is the D-Bus object that will answer calls for the broker.
func (*Bus) CancelIsAuthenticated ¶
CancelIsAuthenticated is the method through which the broker and the daemon will communicate once dbusInterface.CancelIsAuthenticated is called.
func (*Bus) EndSession ¶
EndSession is the method through which the broker and the daemon will communicate once dbusInterface.EndSession is called.
func (*Bus) GetAuthenticationModes ¶
func (b *Bus) GetAuthenticationModes(sessionID string, supportedUILayouts []map[string]string) (authenticationModes []map[string]string, dbusErr *dbus.Error)
GetAuthenticationModes is the method through which the broker and the daemon will communicate once dbusInterface.GetAuthenticationModes is called.
func (*Bus) IsAuthenticated ¶
func (b *Bus) IsAuthenticated(sessionID, authenticationData string) (access, data string, dbusErr *dbus.Error)
IsAuthenticated is the method through which the broker and the daemon will communicate once dbusInterface.IsAuthenticated is called.
func (*Bus) NewSession ¶
func (b *Bus) NewSession(username, lang, mode string) (sessionID, encryptionKey string, dbusErr *dbus.Error)
NewSession is the method through which the broker and the daemon will communicate once dbusInterface.NewSession is called.
func (*Bus) SelectAuthenticationMode ¶
func (b *Bus) SelectAuthenticationMode(sessionID, authenticationModeName string) (uiLayoutInfo map[string]string, dbusErr *dbus.Error)
SelectAuthenticationMode is the method through which the broker and the daemon will communicate once dbusInterface.SelectAuthenticationMode is called.