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

@@ -203,14 +203,18 @@ func (fs *CryptFs) 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
}
result := make([]os.FileInfo, 0, len(list))
for _, info := range list {
result = append(result, fs.ConvertFileInfo(info))
result := make([]os.FileInfo, len(entries))
for idx, entry := range entries {
info, err := entry.Info()
if err != nil {
return nil, err
}
result[idx] = fs.ConvertFileInfo(info)
}
return result, nil
}