auth

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthViaPassword

func AuthViaPassword(config *commons.Config) (bool, error)

AuthViaPassword authenticate a user via password

func AuthViaPublicKey

func AuthViaPublicKey(config *commons.Config) (bool, []string, error)

AuthViaPublicKey authenticate a user via public key

func CreateSshDir added in v0.1.3

func CreateSshDir(config *commons.Config) error

func EnsureVirtualFolders added in v0.2.0

func EnsureVirtualFolders(config *commons.Config, vfolders []types.SFTPGoVirtualFolder) error

EnsureVirtualFolders ensures all virtual folders exist in SFTPGo with the current configuration. For each folder, it updates the folder via PUT /api/v2/folders/{name}; if the folder is not found, creates it via POST. An existing folder is always updated, because its filesystem config (the iRODS password, endpoint, collection path, ...) may have changed since it was created, and SFTPGo mounts what is stored, not what the hook returns.

func GetHomeCollectionPath

func GetHomeCollectionPath(config *commons.Config, options []string) string

GetHomeCollectionPath returns the home collection path a key is confined to, which is the user's home unless a home= option names another collection. The caller compares the result against commons.Config.GetHomeDirPath, so the default has to come from there rather than be spelled out again here.

func IsClientRejected

func IsClientRejected(clientIP string, options []string) bool

func IsKeyExpired

func IsKeyExpired(options []string) bool

func MakeSFTPGoUser

func MakeSFTPGoUser(config *commons.Config, sftpgoUsername string, mountPaths []types.MountPath) (*types.SFTPGoUser, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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