Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDBusNameTaken ¶
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 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
Click to show internal directories.
Click to hide internal directories.