sasl

package
v0.0.0-...-c50cd03 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GSS_C_MANUAL_FLAG   uint32 = 2
	GSS_C_SEQUENCE_FLAG uint32 = 8
	GSS_C_CONF_FLAG     uint32 = 16
	GSS_C_INTEG_FLAG    uint32 = 32
)
View Source
const (
	START    = 1
	OK       = 2
	BAD      = 3
	ERROR    = 4
	COMPLETE = 5
)
View Source
const DEFAULT_MAX_LENGTH = 16384000

Variables

View Source
var (
	AUTH      = "auth"
	AUTH_INT  = "auth-int"
	AUTH_CONF = "auth-conf"
)
View Source
var QOP_TO_FLAG = map[string]byte{
	AUTH:      1,
	AUTH_INT:  2,
	AUTH_CONF: 4,
}

Functions

This section is empty.

Types

type Client

type Client struct {
	AuthorizationID string
	// contains filtered or unexported fields
}

func NewSaslClient

func NewSaslClient(host string, mechanism Mechanism) *Client

func (*Client) Complete

func (c *Client) Complete() bool

func (*Client) Decode

func (c *Client) Decode(incoming []byte) ([]byte, error)

func (*Client) Dispose

func (c *Client) Dispose()

func (*Client) Encode

func (c *Client) Encode(outgoing []byte) ([]byte, error)

func (*Client) GetConfig

func (c *Client) GetConfig() *MechanismConfig

func (*Client) Start

func (c *Client) Start() ([]byte, error)

func (*Client) Step

func (c *Client) Step(challenge []byte) ([]byte, error)

type DigestMD5Mechanism

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

func NewDigestMD5Mechanism

func NewDigestMD5Mechanism(service, username, password string) *DigestMD5Mechanism

type GSSAPIContext

type GSSAPIContext struct {
	DebugLog       bool
	RunAsService   bool
	ServiceName    string
	ServiceAddress string

	gssapi.Options

	*gssapi.Lib `json:"-"`
	// contains filtered or unexported fields
}

type GSSAPIMechanism

type GSSAPIMechanism struct {
	UserSelectQop uint8
	MaxLength     int
	// contains filtered or unexported fields
}

func NewGSSAPIMechanism

func NewGSSAPIMechanism(service string) *GSSAPIMechanism

type Mechanism

type Mechanism interface {
	// contains filtered or unexported methods
}

type MechanismConfig

type MechanismConfig struct {
	AuthorizationID string
	// contains filtered or unexported fields
}

type PlainMechanism

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

func NewPlainMechanism

func NewPlainMechanism(username, password string) *PlainMechanism

type TSaslTransport

type TSaslTransport struct {
	OpeningContext context.Context
	// contains filtered or unexported fields
}

func NewTSaslTransport

func NewTSaslTransport(trans thrift.TTransport, host string, mechanismName string,
	configuration map[string]string, maxLength uint32) (transport *TSaslTransport)

func (*TSaslTransport) Close

func (t *TSaslTransport) Close() error

func (*TSaslTransport) Flush

func (t *TSaslTransport) Flush(ctx context.Context) error

func (*TSaslTransport) IsOpen

func (t *TSaslTransport) IsOpen() bool

func (*TSaslTransport) Open

func (t *TSaslTransport) Open() (err error)

func (*TSaslTransport) Read

func (t *TSaslTransport) Read(p []byte) (n int, err error)

func (*TSaslTransport) RemainingBytes

func (t *TSaslTransport) RemainingBytes() uint64

func (*TSaslTransport) Write

func (t *TSaslTransport) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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