goUserLogin

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package goUserLogin 提供用户认证方法,包括基于文件的认证和基于 LDAP 的认证。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthType

type AuthType string

AuthType 表示要使用的认证类型。

const (
	// FileAuth 表示基于文件的认证。
	FileAuth AuthType = "file"

	// LdapAuth 表示基于 LDAP 的认证。
	LdapAuth AuthType = "ldap"
)

type Authenticator

type Authenticator interface {
	Authenticate(u *UserLoginInfo) (bool, error)
}

Authenticator 是一个接口,定义了认证用户的方法。

type UserLoginInfo

type UserLoginInfo struct {
	Username string
	Password string
	AuthType AuthType
}

UserLoginInfo 表示用户的登录信息。

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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