Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JWTClaimsBasedAuthorisationRule ¶
ClaimsBasedAuthorisationRule decides if access is approved or denied based on the given claims. Returning true, nil indicates access is approved. Returning false, nil indicates access is denied. Returning *, err endicates an error occurred when evaluating the rule.
func MakeDefaultJWTClaimsBasedAuthorisationRule ¶
func MakeDefaultJWTClaimsBasedAuthorisationRule(authorisationRuleExpression string) (JWTClaimsBasedAuthorisationRule, error)
type Rule ¶
Rule is an authorisation rule that is is responsible for deciding if access to a resource should be allowed or denied. If a Rule returns a nil error, this indicates access is allowed. If a Rule returns a non-nil error, this indicates that either access is denied or some other error was encountered during Rule evaluation. If the Rule returns a nil error, it must return a non-nil Context. The returned Context may be the input ctx or a new Context derived from the input ctx, capturing additional values.
func MakeGRPCJWTAuthorisationRule ¶
func MakeGRPCJWTAuthorisationRule(authRule JWTClaimsBasedAuthorisationRule, authenticator jwtauth.Authenticator) (Rule, error)
MakeGRPCAuthorisationRule creates an authorisation Rule from a claims-based authorisation Rule and a jwtauth Authenticator.