Documentation
¶
Index ¶
- func AuthViaPassword(config *commons.Config) (bool, error)
- func AuthViaPublicKey(config *commons.Config) (bool, []string, error)
- func CreateSshDir(config *commons.Config) error
- func EnsureVirtualFolders(config *commons.Config, vfolders []types.SFTPGoVirtualFolder) error
- func GetHomeCollectionPath(config *commons.Config, options []string) string
- func IsClientRejected(clientIP string, options []string) bool
- func IsKeyExpired(options []string) bool
- func MakeSFTPGoUser(config *commons.Config, sftpgoUsername string, mountPaths []types.MountPath) (*types.SFTPGoUser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthViaPassword ¶
AuthViaPassword authenticate a user via password
func AuthViaPublicKey ¶
AuthViaPublicKey authenticate a user via public key
func CreateSshDir ¶ added in v0.1.3
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 ¶
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 IsKeyExpired ¶
func MakeSFTPGoUser ¶
Types ¶
This section is empty.