Sha256: 31e56886dc9a0d4f701a680f43506dbc5d8e91f21bd624d4d40bcacc1c19a9a7
Contents?: true
Size: 888 Bytes
Versions: 6
Compression:
Stored size: 888 Bytes
Contents
# encoding: UTF-8 module Vines class Stream class Server class Outbound class AuthDialbackResult < State RESULT, VALID, INVALID, TYPE = %w[result valid invalid type].map {|s| s.freeze } attr_accessor :dialback_secret def initialize(stream, success=Ready) super end 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 private def result?(node) node.name == RESULT && namespace(node) == NAMESPACES[:legacy_dialback] end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems