Documentation ¶
Index ¶
- type Server3DHAuthChannel
- func (ah *Server3DHAuthChannel) Bidirectional() bool
- func (ah *Server3DHAuthChannel) Closed(err error)
- func (ah *Server3DHAuthChannel) OnlyClientCanOpen() bool
- func (ah *Server3DHAuthChannel) OpenInbound(channel *channels.Channel, oc *Protocol_Data_Control.OpenChannel) ([]byte, error)
- func (ah *Server3DHAuthChannel) OpenOutbound(channel *channels.Channel) ([]byte, error)
- func (ah *Server3DHAuthChannel) OpenOutboundResult(err error, crm *Protocol_Data_Control.ChannelResult)
- func (ah *Server3DHAuthChannel) Packet(data []byte)
- func (ah *Server3DHAuthChannel) RequiresAuthentication() string
- func (ah *Server3DHAuthChannel) Singleton() bool
- func (ah *Server3DHAuthChannel) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server3DHAuthChannel ¶
type Server3DHAuthChannel struct { // PrivateKey must be set for client-side authentication channels ServerIdentity identity.Identity // Callbacks ServerAuthValid func(hostname string, publicKey ed25519.PublicKey) (allowed, known bool) ServerAuthInvalid func(err error) // contains filtered or unexported fields }
Server3DHAuthChannel wraps implementation of im.ricochet.auth.hidden-service"
func (*Server3DHAuthChannel) Bidirectional ¶
func (ah *Server3DHAuthChannel) Bidirectional() bool
Bidirectional Returns whether or not the given channel allows anyone to send messages
func (*Server3DHAuthChannel) Closed ¶
func (ah *Server3DHAuthChannel) Closed(err error)
Closed is called when the channel is closed for any reason.
func (*Server3DHAuthChannel) OnlyClientCanOpen ¶
func (ah *Server3DHAuthChannel) OnlyClientCanOpen() bool
OnlyClientCanOpen ...
func (*Server3DHAuthChannel) OpenInbound ¶
func (ah *Server3DHAuthChannel) OpenInbound(channel *channels.Channel, oc *Protocol_Data_Control.OpenChannel) ([]byte, error)
OpenInbound is the first method called for an inbound channel request. Infof an error is returned, the channel is rejected. Infof a RawMessage is returned, it will be sent as the ChannelResult message. Remote -> [Open Authentication Channel] -> Local
func (*Server3DHAuthChannel) OpenOutbound ¶
func (ah *Server3DHAuthChannel) OpenOutbound(channel *channels.Channel) ([]byte, error)
OpenOutbound is the first method called for an outbound channel request. Infof an error is returned, the channel is not opened. Infof a RawMessage is returned, it will be sent as the OpenChannel message. Local -> [Open Authentication Channel] -> Remote
func (*Server3DHAuthChannel) OpenOutboundResult ¶
func (ah *Server3DHAuthChannel) OpenOutboundResult(err error, crm *Protocol_Data_Control.ChannelResult)
OpenOutboundResult is called when a response is received for an outbound OpenChannel request. Infof `err` is non-nil, the channel was rejected and Closed will be called immediately afterwards. `raw` contains the raw protocol message including any extension data. Input: Remote -> [ChannelResult] -> {Client} Output: {Client} -> [Proof] -> Remote
func (*Server3DHAuthChannel) Packet ¶
func (ah *Server3DHAuthChannel) Packet(data []byte)
Packet is called for each raw packet received on this channel. Input: Client -> [Proof] -> Remote OR Input: Remote -> [Result] -> Client
func (*Server3DHAuthChannel) RequiresAuthentication ¶
func (ah *Server3DHAuthChannel) RequiresAuthentication() string
RequiresAuthentication Returns whether or not the given channel type requires authentication
func (*Server3DHAuthChannel) Singleton ¶
func (ah *Server3DHAuthChannel) Singleton() bool
Singleton Returns whether or not the given channel type is a singleton
func (*Server3DHAuthChannel) Type ¶
func (ah *Server3DHAuthChannel) Type() string
Type returns the type string for this channel, e.g. "im.ricochet.chat".