Documentation ¶
Index ¶
Constants ¶
View Source
const ( DBusObjectName = "io.mender.AuthenticationManager" DBusObjectPath = "/io/mender/AuthenticationManager" DBusInterfaceName = "io.mender.Authentication1" DBusMethodNameGetJwtToken = "GetJwtToken" DBusMethodNameFetchJwtToken = "FetchJwtToken" DBusSignalNameJwtTokenStateChange = "JwtTokenStateChange" DBusMethodTimeoutInMilliSeconds = 5000 )
DbBus constants for the Mender Authentication Manager
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthClient ¶
type AuthClient interface { // Connect to the Mender client interface Connect(objectName, objectPath, interfaceName string) error // GetJWTToken returns a device JWT token GetJWTToken() (string, string, error) // FetchJWTToken schedules the fetching of a new device JWT token FetchJWTToken() (bool, error) // WaitForJwtTokenStateChange synchronously waits for the JwtTokenStateChange signal WaitForJwtTokenStateChange() ([]dbus.SignalParams, error) }
AuthClient is the interface for the Mender Authentication Manager clilents
func NewAuthClient ¶
func NewAuthClient(dbusAPI dbus.DBusAPI) (AuthClient, error)
NewAuthClient returns a new AuthClient
type AuthClientDBUS ¶
type AuthClientDBUS struct {
// contains filtered or unexported fields
}
AuthClientDBUS is the implementation of the client for the Mender Authentication Manager which communicates using DBUS
func (*AuthClientDBUS) Connect ¶
func (a *AuthClientDBUS) Connect(objectName, objectPath, interfaceName string) error
Connect to the Mender client interface
func (*AuthClientDBUS) FetchJWTToken ¶
func (a *AuthClientDBUS) FetchJWTToken() (bool, error)
FetchJWTToken schedules the fetching of a new device JWT token
func (*AuthClientDBUS) GetJWTToken ¶
func (a *AuthClientDBUS) GetJWTToken() (string, string, error)
GetJWTToken returns a device JWT token and server URL
func (*AuthClientDBUS) WaitForJwtTokenStateChange ¶
func (a *AuthClientDBUS) WaitForJwtTokenStateChange() ([]dbus.SignalParams, error)
WaitForJwtTokenStateChange synchronously waits for the JwtTokenStateChange signal
Click to show internal directories.
Click to hide internal directories.