Class: Vines::Stream::Server::Outbound::AuthExternal
- Inherits:
-
Vines::Stream::State
- Object
- Vines::Stream::State
- Vines::Stream::Server::Outbound::AuthExternal
- Defined in:
- lib/vines/stream/server/outbound/auth_external.rb
Constant Summary
Constants included from Node
Instance Attribute Summary
Attributes inherited from Vines::Stream::State
Instance Method Summary collapse
-
#initialize(stream, success = AuthExternalResult) ⇒ AuthExternal
constructor
A new instance of AuthExternal.
- #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 = AuthExternalResult) ⇒ AuthExternal
Returns a new instance of AuthExternal.
8 9 10 |
# File 'lib/vines/stream/server/outbound/auth_external.rb', line 8 def initialize(stream, success=AuthExternalResult) super end |
Instance Method Details
#node(node) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/vines/stream/server/outbound/auth_external.rb', line 12 def node(node) raise StreamErrors::NotAuthorized unless external?(node) authzid = Base64.strict_encode64(stream.domain) stream.write(%Q{<auth xmlns="#{NAMESPACES[:sasl]}" mechanism="EXTERNAL">#{authzid}</auth>}) advance end |