OIDC: add support for custom fields

These fields can be used in the pre-login hook to implement custom
logics

Fixes #787

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-04-12 19:31:25 +02:00
parent 87d7854453
commit cacfffc5bf
15 changed files with 150 additions and 67 deletions

View File

@@ -3,6 +3,7 @@ package vfs
import (
"fmt"
"io"
"io/fs"
"net/http"
"os"
"path"
@@ -170,12 +171,20 @@ func (*OsFs) ReadDir(dirname string) ([]os.FileInfo, error) {
if err != nil {
return nil, err
}
list, err := f.Readdir(-1)
entries, err := f.ReadDir(-1)
f.Close()
if err != nil {
return nil, err
}
return list, nil
result := make([]fs.FileInfo, len(entries))
for idx, entry := range entries {
info, err := entry.Info()
if err != nil {
return nil, err
}
result[idx] = info
}
return result, nil
}
// IsUploadResumeSupported returns true if resuming uploads is supported