mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-07 06:57:37 +03:00
Implement table-based authentication provider
This commit is contained in:
parent
a91d8c2334
commit
cdd01c8e37
10 changed files with 450 additions and 1 deletions
11
internal/testutils/table.go
Normal file
11
internal/testutils/table.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package testutils
|
||||
|
||||
type Table struct {
|
||||
M map[string]string
|
||||
Err error
|
||||
}
|
||||
|
||||
func (m Table) Lookup(a string) (string, bool, error) {
|
||||
b, ok := m.M[a]
|
||||
return b, ok, m.Err
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue