gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

auth_anonymous.go (396B)


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