humcommon

package module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 15 Imported by: 0

README

Linux HTTPS User Management

PAM and NSS modules to allow for remote login and remote user management against an HTTPS server using mTLS.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigError bool

Functions

func GetHTTPClient

func GetHTTPClient() *http.Client

func Log

func Log() *logrus.Logger

Types

type Config

type Config struct {
	TLS struct {
		CA   string
		Key  string
		Cert string
	}
	Debug     bool
	URL       string
	TokenFile string
}
var AppConfig *Config

func NewConfig

func NewConfig(configPath string) (*Config, error)

type TokenUser

type TokenUser struct {
	Token string `json:"token"`
	User  User   `json:"user"`
}

func Authenticate

func Authenticate(user, password string) (*TokenUser, error)

type User

type User struct {
	Admin    bool   `json:"is_staff"`
	Email    string `json:"email"`
	ID       int    `json:"id"`
	Username string `json:"username"`
}

func (User) GetPasswdLine

func (u User) GetPasswdLine() []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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