Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JWTClaimsBasedAuthorizationRule ¶ added in v0.108.0
ClaimsBasedAuthorizationRule 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 MakeDefaultJWTClaimsBasedAuthorizationRule ¶ added in v0.108.0
func MakeDefaultJWTClaimsBasedAuthorizationRule(authorizationRuleExpression string) (JWTClaimsBasedAuthorizationRule, error)
type Rule ¶
Rule is an authorization 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 MakeGRPCJWTAuthorizationRule ¶ added in v0.108.0
func MakeGRPCJWTAuthorizationRule(authRule JWTClaimsBasedAuthorizationRule, authenticator jwtauth.Authenticator) (Rule, error)
MakeGRPCAuthorizationRule creates an authorization Rule from a claims-based authorization Rule and a jwtauth Authenticator.
func MakeRESTJWTAuthorizationRule ¶ added in v0.109.0
func MakeRESTJWTAuthorizationRule(authRule JWTClaimsBasedAuthorizationRule, authenticator jwtauth.Authenticator) (Rule, error)
MakeRESTJWTAuthorizationRule creates an authorization Rule from a claims-based authorization Rule and a jwtauth Authenticator.