mirror of
https://github.com/safing/portbase
synced 2025-09-10 23:34:42 +00:00
Add API Key auth and improve endpoints
This commit is contained in:
parent
8c6cb758f7
commit
11e8271d41
10 changed files with 529 additions and 164 deletions
|
@ -77,7 +77,7 @@ func TestPermissions(t *testing.T) { //nolint:gocognit
|
|||
PermitUser,
|
||||
PermitAdmin,
|
||||
PermitSelf,
|
||||
Require,
|
||||
Dynamic,
|
||||
NotFound,
|
||||
100, // Test a too high value.
|
||||
-100, // Test a too low value.
|
||||
|
@ -117,7 +117,7 @@ func TestPermissions(t *testing.T) { //nolint:gocognit
|
|||
case handlerPerm == PermitAnyone:
|
||||
// This is fast-tracked. There are not additional checks.
|
||||
expectSuccess = true
|
||||
case handlerPerm == Require:
|
||||
case handlerPerm == Dynamic:
|
||||
// This is turned into PermitAnyone in the authenticator.
|
||||
// But authentication is still processed and the result still gets
|
||||
// sanity checked!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue