Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessDecision ¶
type AccessDecision int
AccessDecision defines access decision type which represents voter result
const ( // AccessAbstained defines access decision in case voter is not responsible for permission AccessAbstained AccessDecision = iota // AccessGranted defines access decision in case when voter grants an access AccessGranted AccessDecision = iota // AccessDenied defines access decision in case when voter denies an access AccessDenied AccessDecision = iota )
type IsLoggedInVoter ¶
type IsLoggedInVoter struct{}
IsLoggedInVoter votes for users who have authenticated
func (*IsLoggedInVoter) Vote ¶
func (v *IsLoggedInVoter) Vote(allAssignedPermissions []string, desiredPermission string, _ interface{}) AccessDecision
Vote for the authentication request
type PermissionVoter ¶
type PermissionVoter struct{}
PermissionVoter votes on specific permission
func (*PermissionVoter) Vote ¶
func (v *PermissionVoter) Vote(allAssignedPermissions []string, desiredPermission string, forObject interface{}) AccessDecision
Vote for permission
type SecurityVoter ¶
type SecurityVoter interface {
Vote(allAssignedPermissions []string, desiredPermission string, forObject interface{}) AccessDecision
}
SecurityVoter defines a common interface for voters who vote on security decisions
Click to show internal directories.
Click to hide internal directories.