Class: Vines::Stream::Server::Outbound::AuthDialbackResult
- Inherits:
-
Vines::Stream::State
- Object
- Vines::Stream::State
- Vines::Stream::Server::Outbound::AuthDialbackResult
- Defined in:
- lib/vines/stream/server/outbound/auth_dialback_result.rb
Constant Summary
Constants included from Node
Instance Attribute Summary collapse
-
#dialback_secret ⇒ Object
Returns the value of attribute dialback_secret.
Attributes inherited from Vines::Stream::State
Instance Method Summary collapse
-
#initialize(stream, success = Ready) ⇒ AuthDialbackResult
constructor
A new instance of AuthDialbackResult.
- #node(node) ⇒ Object
Methods inherited from Vines::Stream::State
Methods included from Node
body?, namespace, stream?, to_stanza
Methods included from Log
Constructor Details
#initialize(stream, success = Ready) ⇒ AuthDialbackResult
Returns a new instance of AuthDialbackResult.
12 13 14 |
# File 'lib/vines/stream/server/outbound/auth_dialback_result.rb', line 12 def initialize(stream, success=Ready) super end |
Instance Attribute Details
#dialback_secret ⇒ Object
Returns the value of attribute dialback_secret.
10 11 12 |
# File 'lib/vines/stream/server/outbound/auth_dialback_result.rb', line 10 def dialback_secret @dialback_secret end |
Instance Method Details
#node(node) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/vines/stream/server/outbound/auth_dialback_result.rb', line 16 def node(node) raise StreamErrors::NotAuthorized unless result?(node) case node[TYPE] when VALID advance stream.notify_connected when INVALID stream.close_connection else raise StreamErrors::NotAuthorized end end |