auth_anonymous.go 396 B

1234567891011121314151617
  1. package dbus
  2. // AuthAnonymous returns an Auth that uses the ANONYMOUS mechanism.
  3. func AuthAnonymous() Auth {
  4. return &authAnonymous{}
  5. }
  6. type authAnonymous struct{}
  7. func (a *authAnonymous) FirstData() (name, resp []byte, status AuthStatus) {
  8. return []byte("ANONYMOUS"), nil, AuthOk
  9. }
  10. func (a *authAnonymous) HandleData(data []byte) (resp []byte, status AuthStatus) {
  11. return nil, AuthError
  12. }