Sha256: 8b7f01bcd0d759bbc067d3dae0e592f44601287470ef4d0c9f048c416b47cdac

Contents?: true

Size: 770 Bytes

Versions: 24

Compression:

Stored size: 770 Bytes

Contents

# encoding: UTF-8

module Vines
  class Stream
    class Client
      class AuthRestart < State
        def initialize(stream, success=Auth)
          super
        end

        def node(node)
          raise StreamErrors::NotAuthorized unless stream?(node)
          stream.start(node)
          doc = Document.new
          features = doc.create_element('stream:features') do |el|
            el << doc.create_element('mechanisms') do |parent|
              parent.default_namespace = NAMESPACES[:sasl]
              stream.authentication_mechanisms.each do |name|
                parent << doc.create_element('mechanism', name)
              end
            end
          end
          stream.write(features)
          advance
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
diaspora-vines-0.2.0.develop.4 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.2.0.develop.3 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.2.0.develop.2 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.2.0.develop.1 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.1.28 lib/vines/stream/client/auth_restart.rb
lygneo-vines-0.1.5 lib/vines/stream/client/auth_restart.rb
lygneo-vines-0.1.1 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.1.27 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.1.26 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.1.25 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.1.24 lib/vines/stream/client/auth_restart.rb
vines-0.4.10 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.1.22 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.1.21 lib/vines/stream/client/auth_restart.rb
diaspora-vines-0.1.2 lib/vines/stream/client/auth_restart.rb
vines-0.4.9 lib/vines/stream/client/auth_restart.rb
vines-0.4.8 lib/vines/stream/client/auth_restart.rb
vines-0.4.7 lib/vines/stream/client/auth_restart.rb
vines-0.4.6 lib/vines/stream/client/auth_restart.rb
vinesmod-0.4.5.2 lib/vines/stream/client/auth_restart.rb