Sha256: a31ae77c57163557bfc82da07a55e918bdcac93cc68e9da02ddf7d23499848ab

Contents?: true

Size: 728 Bytes

Versions: 18

Compression:

Stored size: 728 Bytes

Contents

# encoding: UTF-8

module Vines
  class Stream
    class Server
      class Outbound
        class AuthResult < State
          SUCCESS = 'success'.freeze
          FAILURE = 'failure'.freeze

          def initialize(stream, success=FinalRestart)
            super
          end

          def node(node)
            raise StreamErrors::NotAuthorized unless namespace(node) == NAMESPACES[:sasl]
            case node.name
            when SUCCESS
              stream.start(node)
              stream.reset
              advance
            when FAILURE
              stream.close_connection
            else
              raise StreamErrors::NotAuthorized
            end
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
lygneo-vines-0.1.5 lib/vines/stream/server/outbound/auth_result.rb
lygneo-vines-0.1.1 lib/vines/stream/server/outbound/auth_result.rb
diaspora-vines-0.1.26 lib/vines/stream/server/outbound/auth_result.rb
diaspora-vines-0.1.25 lib/vines/stream/server/outbound/auth_result.rb
diaspora-vines-0.1.24 lib/vines/stream/server/outbound/auth_result.rb
vines-0.4.10 lib/vines/stream/server/outbound/auth_result.rb
diaspora-vines-0.1.22 lib/vines/stream/server/outbound/auth_result.rb
diaspora-vines-0.1.21 lib/vines/stream/server/outbound/auth_result.rb
diaspora-vines-0.1.2 lib/vines/stream/server/outbound/auth_result.rb
vines-0.4.9 lib/vines/stream/server/outbound/auth_result.rb
vines-0.4.8 lib/vines/stream/server/outbound/auth_result.rb
vines-0.4.7 lib/vines/stream/server/outbound/auth_result.rb
vines-0.4.6 lib/vines/stream/server/outbound/auth_result.rb
vinesmod-0.4.5.2 lib/vines/stream/server/outbound/auth_result.rb
vinesmod-0.4.5 lib/vines/stream/server/outbound/auth_result.rb
vines-0.4.5 lib/vines/stream/server/outbound/auth_result.rb
vines-0.4.4 lib/vines/stream/server/outbound/auth_result.rb
vines-0.4.3 lib/vines/stream/server/outbound/auth_result.rb