identity

package
v1.4.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IdentifiableController

type IdentifiableController struct {
	// contains filtered or unexported fields
}

func NewIdentifiableController

func NewIdentifiableController(c node.Controller, i Identifier) *IdentifiableController

func (*IdentifiableController) Authenticate

func (c *IdentifiableController) Authenticate(sid string, env *common.SessionEnv) (*common.ConnectResult, error)

func (*IdentifiableController) Disconnect

func (c *IdentifiableController) Disconnect(sid string, env *common.SessionEnv, id string, subscriptions []string) error

func (*IdentifiableController) Perform

func (c *IdentifiableController) Perform(sid string, env *common.SessionEnv, id string, channel string, data string) (*common.CommandResult, error)

func (*IdentifiableController) Shutdown

func (c *IdentifiableController) Shutdown() error

func (*IdentifiableController) Start

func (c *IdentifiableController) Start() error

func (*IdentifiableController) Subscribe

func (c *IdentifiableController) Subscribe(sid string, env *common.SessionEnv, id string, channel string) (*common.CommandResult, error)

func (*IdentifiableController) Unsubscribe

func (c *IdentifiableController) Unsubscribe(sid string, env *common.SessionEnv, id string, channel string) (*common.CommandResult, error)

type Identifier

type Identifier interface {
	Identify(sid string, env *common.SessionEnv) (*common.ConnectResult, error)
}

type JWTConfig

type JWTConfig struct {
	Secret string
	Param  string
	Algo   jwt.SigningMethod
	Force  bool
}

func NewJWTConfig

func NewJWTConfig(secret string) JWTConfig

func (JWTConfig) Enabled

func (c JWTConfig) Enabled() bool

type JWTIdentifier

type JWTIdentifier struct {
	// contains filtered or unexported fields
}

func NewJWTIdentifier

func NewJWTIdentifier(config *JWTConfig) *JWTIdentifier

func (*JWTIdentifier) Identify

func (i *JWTIdentifier) Identify(sid string, env *common.SessionEnv) (*common.ConnectResult, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL