authkeeper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDBusNameTaken

func IsDBusNameTaken(dbusName string) (bool, error)

IsDBusNameTaken checks if the dbus name is already taken.

Types

type AuthKeeper

type AuthKeeper struct {
	Dbus         *dbus.DbusAuth
	Oauth2       *remoteauth.Oauth2Auth
	Timeout      uint32
	ReadAllowed  bool
	WriteAllowed bool
	// contains filtered or unexported fields
}

func NewNoAuth

func NewNoAuth() (*AuthKeeper, error)

no auth at all

func NewOauth

func NewOauth(controller string, skipVerify bool) (*AuthKeeper, error)

remote auth with oauth2

func NewPolkitAuth

func NewPolkitAuth(dbusName, dbusPath string) (*AuthKeeper, error)

setup the dbus authorization call back.

func (*AuthKeeper) Close

func (a *AuthKeeper) Close() error

func (*AuthKeeper) Deauthorize

func (a *AuthKeeper) Deauthorize() *godbus.Error

func (*AuthKeeper) IsReadAuthorized

func (a *AuthKeeper) IsReadAuthorized(ctx context.Context) (bool, error)

func (*AuthKeeper) IsWriteAuthorized

func (a *AuthKeeper) IsWriteAuthorized(ctx context.Context) (bool, error)

func (*AuthKeeper) Mode

func (a *AuthKeeper) Mode() AuthMode

type AuthMode

type AuthMode uint

Jump to

Keyboard shortcuts

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