2019-04-25 04:52:08 +07:00
|
|
|
package authorization
|
|
|
|
|
|
|
|
// Level is the type representing an authorization level.
|
|
|
|
type Level int
|
|
|
|
|
|
|
|
const (
|
|
|
|
// Bypass bypass level.
|
|
|
|
Bypass Level = iota
|
|
|
|
// OneFactor one factor level.
|
|
|
|
OneFactor Level = iota
|
|
|
|
// TwoFactor two factor level.
|
|
|
|
TwoFactor Level = iota
|
|
|
|
// Denied denied level.
|
|
|
|
Denied Level = iota
|
|
|
|
)
|
2021-03-05 11:18:31 +07:00
|
|
|
|
|
|
|
const userPrefix = "user:"
|
|
|
|
const groupPrefix = "group:"
|
2021-04-14 17:53:23 +07:00
|
|
|
|
2021-06-18 08:38:01 +07:00
|
|
|
const bypass = "bypass"
|
|
|
|
const oneFactor = "one_factor"
|
|
|
|
const twoFactor = "two_factor"
|
|
|
|
const deny = "deny"
|
|
|
|
|
2021-04-14 17:53:23 +07:00
|
|
|
const traceFmtACLHitMiss = "ACL %s Position %d for subject %s and object %s (Method %s)"
|