Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeMapping ¶
AttributeMapping is a store for any database retrieved results. The keys are either SQL field names or LDAP attributes, while the values are the results.
type LDAPAuthRequest ¶
type LDAPAuthRequest struct {
// GUID is the unique identifier for the LDAP auth request.
// It can be nil.
GUID *string
// BindDN is the Distinguished Name for binding to the LDAP server.
BindDN string
// BindPW is the password for binding to the LDAP server.
BindPW string
// LDAPReplyChan is a channel where the LDAP responses will be sent.
LDAPReplyChan chan *LDAPReply
// HTTPClientContext is the context for the HTTP client
// carrying the LDAP auth request.
HTTPClientContext context.Context
}
LDAPAuthRequest represents a request to authenticate with an LDAP server.
func (*LDAPAuthRequest) GetLDAPReplyChan ¶
func (l *LDAPAuthRequest) GetLDAPReplyChan() chan *LDAPReply
GetLDAPReplyChan returns the channel where LDAP responses are sent.
type LDAPModifyAttributes ¶
LDAPModifyAttributes represents a map of attribute names to their corresponding values for LDAP modify operations.
type LDAPReply ¶
type LDAPReply struct {
// Result holds the outcome of a database query or LDAP operation, mapping field names or attributes to their values.
Result AttributeMapping
// RawResult contains a slice of raw LDAP entries retrieved from an LDAP operation. It is used for processing raw data.
RawResult []*ldap.Entry
// Err captures any error encountered during the LDAP operation or response parsing.
Err error
}
LDAPReply represents the structure for handling responses from an LDAP operation. It contains the result of the operation, raw entries, and any possible error encountered.
type LDAPRequest ¶
type LDAPRequest struct {
// GUID is the globally unique identifier for this LDAP request, optional.
GUID *string
// RequestID represents the globally unique identifier for an LDAP request. It is a pointer to a string.
RequestID *string
// Filter is the criteria that the LDAP request uses to filter during the search.
Filter string
// BaseDN is the base distinguished name used as the search base.
BaseDN string
// SearchAttributes are the attributes for which values are to be returned in the search results.
SearchAttributes []string
// MacroSource is the source of macros to be used, optional.
MacroSource *util.MacroSource
// Scope defines the scope for LDAP search (base, one, or sub).
Scope config.LDAPScope
// Command represents the LDAP command to be executed (add, modify, delete, or search).
Command definitions.LDAPCommand
// ModifyAttributes contains attributes information used in modify command.
ModifyAttributes LDAPModifyAttributes
// LDAPReplyChan is the channel where reply from LDAP server is sent.
LDAPReplyChan chan *LDAPReply
// HTTPClientContext is the context for managing HTTP requests and responses.
HTTPClientContext context.Context
}
LDAPRequest represents an LDAP request.
func (*LDAPRequest) GetLDAPReplyChan ¶
func (l *LDAPRequest) GetLDAPReplyChan() chan *LDAPReply
GetLDAPReplyChan returns the channel where replies from the LDAP server are sent. It retrieves and returns the value of the `LDAPReplyChan` field of the `LDAPRequest` struct.
type LuaRequest ¶
type LuaRequest struct {
// Function is the Lua command that will be executed.
Function definitions.LuaCommand
// TOTPSecret is the secret value used in time-based one-time password (TOTP) authentication.
TOTPSecret string
// Service is the specific service requested by the client.
Service string
// Protocol points to the protocol that was used by a client to make the request.
Protocol *config.Protocol
// Logs points to custom log key-value pairs to help track the request.
Logs *lualib.CustomLogKeyValue
// Context provides context for the Lua command request.
*lualib.Context
*lualib.CommonRequest
// HTTPClientContext is the client request context from a remote party.
HTTPClientContext *gin.Context
// LuaReplyChan is a channel to receive the response from the Lua backend.
LuaReplyChan chan *lualib.LuaBackendResult
}
LuaRequest is a subset from the Authentication struct. LuaRequest is a struct that includes various information for a request to Lua.
type PoolRequest ¶
PoolRequest represents a generic interface for handling LDAP requests and responses. It provides a method to retrieve a channel for receiving LDAP replies.
type PositivePasswordCache ¶
type PositivePasswordCache struct {
Backend definitions.Backend `json:"passdb_backend"`
Password string `json:"password,omitempty"`
AccountField *string `json:"account_field"`
TOTPSecretField *string `json:"totp_secret_field"`
UniqueUserIDField *string `json:"webauth_userid_field"`
DisplayNameField *string `json:"display_name_field"`
Attributes AttributeMapping `json:"attributes"`
}
PositivePasswordCache is a container that stores all kinds of user information upon a successful authentication. It is used for Redis as a short cache object and as a proxy structure between Nauthilus instances. The cache object is not refreshed upon continuous requests. If the Redis TTL has expired, the object is removed from the cache to force a refresh of the user data from underlying databases.