Codebase list golang-dbus / run/e3949ede-1abe-4a8c-9d05-a5f1e772a578/upstream auth_anonymous.go
run/e3949ede-1abe-4a8c-9d05-a5f1e772a578/upstream

Tree @run/e3949ede-1abe-4a8c-9d05-a5f1e772a578/upstream (Download .tar.gz)

auth_anonymous.go @run/e3949ede-1abe-4a8c-9d05-a5f1e772a578/upstreamraw · history · blame

package dbus

// AuthAnonymous returns an Auth that uses the ANONYMOUS mechanism.
func AuthAnonymous() Auth {
	return &authAnonymous{}
}

type authAnonymous struct{}

func (a *authAnonymous) FirstData() (name, resp []byte, status AuthStatus) {
	return []byte("ANONYMOUS"), nil, AuthOk
}

func (a *authAnonymous) HandleData(data []byte) (resp []byte, status AuthStatus) {
	return nil, AuthError
}