mender

package
v0.0.0-...-f015300 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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