auth

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthNone

type AuthNone struct{}

func NewAuthNone

func NewAuthNone() *AuthNone

func (*AuthNone) Authenticate

func (a *AuthNone) Authenticate(f *frame.HandshakeFrame) bool

func (*AuthNone) Type

func (a *AuthNone) Type() AuthType

type AuthType

type AuthType byte
const (
	AuthTypeNone   AuthType = 0x0
	AuthTypeAppKey AuthType = 0x1
)

func (AuthType) String

func (a AuthType) String() string

type Authentication

type Authentication interface {
	Type() AuthType
	Authenticate(f *frame.HandshakeFrame) bool
}

Authentication for server

type Credential

type Credential interface {
	AppID() string
	Type() AuthType
	Payload() []byte
}

Credential for client

type CredentialNone

type CredentialNone struct{}

func NewCredendialNone

func NewCredendialNone() *CredentialNone

func (*CredentialNone) AppID

func (c *CredentialNone) AppID() string

func (*CredentialNone) Payload

func (c *CredentialNone) Payload() []byte

func (*CredentialNone) Type

func (c *CredentialNone) Type() AuthType

Jump to

Keyboard shortcuts

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