Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLaunchPlugin ¶
func NewLaunchPlugin(fn GenerateAuthInfoFunc) tp.Plugin
NewLaunchPlugin creates a plugin for initiating authorization.
func NewVerifyPlugin ¶
func NewVerifyPlugin(fn VerifyAuthInfoFunc) tp.Plugin
NewVerifyPlugin creates a plugin for verifying authorization.
Types ¶
type GenerateAuthInfoFunc ¶
type GenerateAuthInfoFunc func() string
GenerateAuthInfoFunc the function used to generate auth info
type Session ¶
type Session interface { // Peer returns the peer. Peer() tp.Peer // SetID sets the session id. SetID(newID string) // RemoteAddr returns the remote network address. RemoteAddr() net.Addr // Swap returns custom data swap of the session(socket). Swap() goutil.Map }
Session auth session provides SetID, RemoteAddr and Swap methods in base session
Click to show internal directories.
Click to hide internal directories.