Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
type Guard ¶
type Guard interface { // Check authorizes the Identity ID stored in the context with the given permissions. // Therefore, it should be used after the Enforce() middleware. Check(...string) Middleware }
type GuardImpl ¶
type GuardImpl struct {
// contains filtered or unexported fields
}
GuardImpl implements Guard. It stores a IdentityService to use to authorize an identity.
func NewGuard ¶
func NewGuard(authorizer Authorizer) *GuardImpl
func (*GuardImpl) Check ¶
func (g *GuardImpl) Check(permissions ...string) Middleware
Click to show internal directories.
Click to hide internal directories.