summaryrefslogtreecommitdiff
path: root/vendor/github.com/godbus/dbus/auth_anonymous.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/godbus/dbus/auth_anonymous.go')
-rw-r--r--vendor/github.com/godbus/dbus/auth_anonymous.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/godbus/dbus/auth_anonymous.go b/vendor/github.com/godbus/dbus/auth_anonymous.go
new file mode 100644
index 000000000..75f3ad34d
--- /dev/null
+++ b/vendor/github.com/godbus/dbus/auth_anonymous.go
@@ -0,0 +1,16 @@
+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
+}