Documentation
¶
Overview ¶
auth.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureTLSCerts ¶
func EnsureTLSCerts() error
EnsureTLSCerts ensures TLS certificates exist and are valid at config.TLSCertPath and config.TLSKeyPath, generating self-signed ones if needed.
func GenerateJWT ¶
GenerateJWT creates a JWT for a given username
func HashPassword ¶
HashPassword hashes a password using bcrypt
func ValidateCredentials ¶
func ValidateCredentials(creds UserCredentials) (bool, error)
ValidateCredentials checks username and password against stored users
func ValidateJWT ¶
ValidateJWT checks if a JWT token is valid
Types ¶
type UserCredentials ¶
UserCredentials for login JSON
Click to show internal directories.
Click to hide internal directories.