class Wamp::Client::Message::Challenge
Challenge
The “CHALLENGE” message is used with certain Authentication Methods. During authenticated session establishment, a Router sends a challenge message. Formats:
[CHALLENGE, AuthMethod|string, Extra|dict]
Attributes
authmethod[RW]
extra[RW]
Public Class Methods
new(authmethod, extra)
click to toggle source
# File lib/wamp/client/message.rb, line 1092 def initialize(authmethod, extra) self.class.check_string('authmethod', authmethod) self.class.check_dict('extra', extra) self.authmethod = authmethod self.extra = extra end
parse(params)
click to toggle source
# File lib/wamp/client/message.rb, line 1106 def self.parse(params) self.check_gte('params list', 3, params.count) self.check_equal('message type', self.type, params[0]) params.shift self.new(*params) end
type()
click to toggle source
# File lib/wamp/client/message.rb, line 1102 def self.type Types::CHALLENGE end
Public Instance Methods
payload()
click to toggle source
# File lib/wamp/client/message.rb, line 1116 def payload payload = [self.class.type] payload.push(self.authmethod) payload.push(self.extra) payload end
to_s()
click to toggle source
# File lib/wamp/client/message.rb, line 1125 def to_s 'CHALLENGE > ' + self.payload.to_s end