gsasl

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package gsasl uses cgo to facilitate integration testing against libgsasl.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

Session represents a SASL client or server.

func NewClient

func NewClient(m sasl.Mechanism, opts ...sasl.Option) (*Session, error)

NewClient creates a new gsasl client using the options from a Mellium SASL client.

func NewServer

func NewServer(m sasl.Mechanism, permissions func(*sasl.Negotiator) bool, opts ...sasl.Option) (*Session, error)

NewServer creates a new gsasl server using the options from a Mellium SASL server.

func (*Session) Close

func (c *Session) Close() error

Close cleans up after the session.

func (*Session) State

func (c *Session) State() sasl.State

State returns the internal state in a way that is compatible with sasl.Negotiators.

func (*Session) Step

func (c *Session) Step(challenge []byte) (more bool, resp []byte, err error)

Step advances the client and returns a result in response to a SASL challenge.

Jump to

Keyboard shortcuts

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