Class: Wampproto::Auth::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/wampproto/auth/base.rb

Overview

Auth Base

Direct Known Subclasses

Anonymous, Cra, Cryptosign, Ticket

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, authid, authextra = {}) ⇒ Base

Returns a new instance of Base.



9
10
11
12
13
# File 'lib/wampproto/auth/base.rb', line 9

def initialize(method, authid, authextra = {})
  @authmethod = Validate.string!("AuthMethod", method)
  @authid = Validate.string!("AuthId", authid)
  @authextra = Validate.hash!("AuthExtra", authextra)
end

Instance Attribute Details

#authextraObject (readonly)

Returns the value of attribute authextra.



7
8
9
# File 'lib/wampproto/auth/base.rb', line 7

def authextra
  @authextra
end

#authidObject (readonly)

Returns the value of attribute authid.



7
8
9
# File 'lib/wampproto/auth/base.rb', line 7

def authid
  @authid
end

#authmethodObject (readonly)

Returns the value of attribute authmethod.



7
8
9
# File 'lib/wampproto/auth/base.rb', line 7

def authmethod
  @authmethod
end

Instance Method Details

#authenticate(_challenge) ⇒ Object

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/wampproto/auth/base.rb', line 15

def authenticate(_challenge)
  raise NotImplementedError
end