Class: Jabber::SASL::Anonymous

Class | Jabber::SASL::Anonymous
In: | lib/xmpp4r/sasl.rb
Parent: | Base

SASL Anonymous authentication helper

### Methods

auth

### Public Instance methods

auth(password)

Authenticate by sending nothing with the ANONYMOUS token

[Source]

        # File lib/xmpp4r/sasl.rb, line 78
    78:       def auth(password)
    79:         auth_text = "#{@stream.jid.node}"
    80:         error = nil
    81:         @stream.send(generate_auth('ANONYMOUS', Base64::encode64(auth_text).gsub(/\s/, ''))) { |reply|
    82:           if reply.name != 'success'
    83:             error = reply.first_element(nil).name
    84:           end
    85:           true
    86:         }
    87:
    88:         raise error if error
    89:       end

[Validate]