auth

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateAuthenticator

type CertificateAuthenticator = auth.CertificateAuthenticator

CertificateAuthenticator is the interface for authenticating a client using TLS certificates.

func NewCertificateAuthenticator added in v1.5.4

func NewCertificateAuthenticator(opts ...CertificateAuthenticatorOption) (CertificateAuthenticator, error)

NewCertificateAuthenticator returns a new certificate authenticator.

type CertificateAuthenticatorOption

type CertificateAuthenticatorOption = auth.CertificateAuthenticatorOption

CertificateAuthenticatorOption represents an authenticator option.

func WithCommonNameRegexp added in v1.5.4

func WithCommonNameRegexp(regexps ...string) CertificateAuthenticatorOption

WithCertificateAuthenticatorCommonName sets the common name.

type Conn

type Conn interface {
	net.Conn

	// UserName returns the user name and true if the connection has the user name.
	UserName() (string, bool)
	// Password returns the password and true if the connection has the password.
	Password() (string, bool)

	// IsTLSConnection return true if the connection is enabled TLS.
	IsTLSConnection() bool
	// TLSConnectionState returns the TLS connection state.
	TLSConnectionState() (*tls.ConnectionState, bool)
}

Conn represents a connection.

type Credential added in v1.5.4

type Credential = auth.Credential

Credential represents a credential.

func NewCredential added in v1.5.4

func NewCredential(opts ...CredentialOptionFn) Credential

NewCredential returns a new credential with options.

type CredentialOptionFn added in v1.5.4

type CredentialOptionFn = auth.CredentialOptionFn

CredentialOptionFn represents an option function for a credential.

func WithCredentialGroup added in v1.5.4

func WithCredentialGroup(group string) CredentialOptionFn

WithCredentialGroup returns an option to set the group.

func WithCredentialPassword added in v1.5.4

func WithCredentialPassword(password string) CredentialOptionFn

WithCredentialPassword returns an option to set the password.

func WithCredentialUsername added in v1.5.4

func WithCredentialUsername(username string) CredentialOptionFn

WithCredentialUsername returns an option to set the username.

type CredentialStore added in v1.5.4

type CredentialStore = auth.CredentialStore

CredentialAuthenticator is the credential authenticator.

type Manader added in v1.5.4

type Manader struct {
	auth.Manager
}

Manader represent an authenticator manager.

func NewManader added in v1.5.4

func NewManader() *Manader

NewManader returns a new authenticator manager.

type Query added in v1.5.4

type Query = auth.Query

Query represents a query.

func NewQuery added in v1.5.4

func NewQuery(opts ...QueryOptionFn) Query

NewQuery returns a new query with options.

type QueryOption added in v1.5.4

type QueryOption = auth.QueryOption

QueryOption represents an option for a query.

type QueryOptionFn added in v1.5.4

type QueryOptionFn = auth.QueryOptionFn

QueryOptionFn represents an option function for a query.

func WithQueryGroup added in v1.5.4

func WithQueryGroup(group string) QueryOptionFn

WithQueryGroup returns an option to set the group.

func WithQueryMechanism added in v1.5.4

func WithQueryMechanism(mech string) QueryOptionFn

WithQueryMechanism returns an option to set the mechanism.

func WithQueryPassword added in v1.5.4

func WithQueryPassword(password string) QueryOptionFn

WithQueryPassword returns an option to set the password.

func WithQueryUsername added in v1.5.4

func WithQueryUsername(username string) QueryOptionFn

WithQueryUsername returns an option to set the username.

Jump to

Keyboard shortcuts

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