Source File
options.go
Belonging Package
mellium.im/sasl
// Copyright 2016 The Mellium Contributors.// Use of this source code is governed by the BSD 2-clause license that can be// found in the LICENSE file.package saslimport ()// An Option represents an input to a SASL state machine.type Option func(*Negotiator)func ( *Negotiator, ...Option) {.credentials = func() (, , []byte) {return}.permissions = func( *Negotiator) bool {return false}for , := range {()}}// TLSState lets the state machine negotiate channel binding with a TLS session// if supported by the underlying mechanism.func ( tls.ConnectionState) Option {return func( *Negotiator) {.tlsState = &}}// RemoteMechanisms sets a list of mechanisms supported by the remote client or// server with which the state machine will be negotiating.// It is used to determine if the server supports channel binding.func ( ...string) Option {return func( *Negotiator) {.remoteMechanisms =}}// Credentials provides the negotiator with a username and password to// authenticate with and (optionally) an authorization identity.// Identity will normally be left empty to act as the username.// The Credentials function is called lazily and may be called multiple times by// the mechanism.// It is not memoized by the negotiator.func ( func() (, , []byte)) Option {return func( *Negotiator) {.credentials =}}
![]() |
The pages are generated with Golds v0.3.6. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |