Class: Vines::Stream::Http::Auth
- Inherits:
-
Client::Auth
- Object
- State
- Client::Auth
- Vines::Stream::Http::Auth
- Defined in:
- lib/vines/stream/http/auth.rb
Constant Summary
Constants inherited from Client::Auth
Client::Auth::AUTH, Client::Auth::EXTERNAL, Client::Auth::MAX_AUTH_ATTEMPTS, Client::Auth::MECHANISM, Client::Auth::NS, Client::Auth::PLAIN, Client::Auth::SUCCESS
Constants inherited from State
Instance Attribute Summary
Attributes inherited from State
Instance Method Summary collapse
-
#initialize(stream, success = BindRestart) ⇒ Auth
constructor
A new instance of Auth.
- #node(node) ⇒ Object
Methods inherited from State
Methods included from Log
Constructor Details
#initialize(stream, success = BindRestart) ⇒ Auth
Returns a new instance of Auth.
7 8 9 |
# File 'lib/vines/stream/http/auth.rb', line 7 def initialize(stream, success=BindRestart) super end |
Instance Method Details
#node(node) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/vines/stream/http/auth.rb', line 11 def node(node) unless stream.valid_session?(node['sid']) && body?(node) && node['rid'] raise StreamErrors::NotAuthorized end nodes = stream.parse_body(node) raise StreamErrors::NotAuthorized unless nodes.size == 1 super(nodes.first) end |