Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SubjectCtxKey = &contextKey{"subject"}
SubjectCtxKey subject context key
Functions ¶
func ContextSubject ¶
ContextSubject returns the value associated with this context for SubjectCtxKey,
func ContextWithSubject ¶
ContextWithSubject return a copy of parent in which the value associated with SubjectCtxKey is subject.
func NewAuthorizer ¶
func NewAuthorizer(e *casbin.Enforcer, s Subject) func(next http.HandlerFunc) http.HandlerFunc
NewAuthorizer returns the authorizer uses a Casbin enforcer and Subject function as input
Types ¶
Click to show internal directories.
Click to hide internal directories.