Documentation ¶
Index ¶
- Constants
- Variables
- type AnonymousMechanism
- type Client
- func (client *Client) Complete() bool
- func (client *Client) Decode(incoming []byte) ([]byte, error)
- func (client *Client) Dispose()
- func (client *Client) Encode(outgoing []byte) ([]byte, error)
- func (client *Client) GetConfig() *MechanismConfig
- func (client *Client) Start() ([]byte, error)
- func (client *Client) Step(challenge []byte) ([]byte, error)
- type CramMD5Mechanism
- type DigestMD5Mechanism
- type GSSAPIMechanism
- type Mechanism
- type MechanismConfig
- type PlainMechanism
- type QOP
Constants ¶
const DEFAULT_MAX_LENGTH = 16384000
DEFAULT_MAX_LENGTH is the max length that will be requested in the negotiation It can be set with gssapiMechanism.MaxLength = 1000
Variables ¶
var AUTH = "auth"
AUTH if the flag used for just basic auth, no confidentiality
var AUTH_CONF = "auth-conf"
AUTH_CONF is the flag for authentication and confidentiality. It the most secure option.
var AUTH_INT = "auth-int"
AUTH_INT is the flag for authentication and integrety
QOP_TO_FLAG is a dict that translate the string flag name into the actual bit It can be used wiht gssapiMechanism.UserSelectQop = QOP_TO_FLAG[AUTH_CONF] | QOP_TO_FLAG[AUTH_INT]
Functions ¶
This section is empty.
Types ¶
type AnonymousMechanism ¶
type AnonymousMechanism struct {
// contains filtered or unexported fields
}
AnonymousMechanism corresponds to NONE/ Anonymous SASL mechanism
func NewAnonymousMechanism ¶
func NewAnonymousMechanism() *AnonymousMechanism
NewAnonymousMechanism returns a new AnonymousMechanism
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the entry point for usage of this library
func NewSaslClient ¶
NewSaslClient creates a new client given a host and a mechanism
func (*Client) GetConfig ¶
func (client *Client) GetConfig() *MechanismConfig
GetConfig returns the configuration of the mechanism
type CramMD5Mechanism ¶
type CramMD5Mechanism struct {
*PlainMechanism
}
CramMD5Mechanism corresponds to PLAIN SASL mechanism
func NewCramMD5Mechanism ¶
func NewCramMD5Mechanism(username string, password string) *CramMD5Mechanism
NewCramMD5Mechanism returns a new PlainMechanism
type DigestMD5Mechanism ¶
type DigestMD5Mechanism struct {
// contains filtered or unexported fields
}
DigestMD5Mechanism corresponds to PLAIN SASL mechanism
func NewDigestMD5Mechanism ¶
func NewDigestMD5Mechanism(service string, username string, password string) *DigestMD5Mechanism
NewDigestMD5Mechanism returns a new PlainMechanism
type GSSAPIMechanism ¶
type GSSAPIMechanism struct {
// contains filtered or unexported fields
}
GSSAPIMechanism corresponds to GSSAPI SASL mechanism
func NewGSSAPIMechanism ¶
func NewGSSAPIMechanism(service string) (mechanism *GSSAPIMechanism, err error)
NewGSSAPIMechanism returns a new GSSAPIMechanism
type Mechanism ¶
type Mechanism interface {
// contains filtered or unexported methods
}
Mechanism is the common interface for all mechanisms
type MechanismConfig ¶
type MechanismConfig struct { // It can be set with mechanism.getConfig().AuthorizationID = "authorizationId" AuthorizationID string // contains filtered or unexported fields }
MechanismConfig is the configuration to use for mechanisms
type PlainMechanism ¶
type PlainMechanism struct {
// contains filtered or unexported fields
}
PlainMechanism corresponds to PLAIN SASL mechanism
func NewPlainMechanism ¶
func NewPlainMechanism(username string, password string) *PlainMechanism
NewPlainMechanism returns a new PlainMechanism