A function map to allow a programmatic execution of allow/deny directives
A function map to allow a programmatic execution of allow/deny directives
(add-acl rule config-map)
Add various ACL to the incoming rule, based on content of the config-map
Add various ACL to the incoming rule, based on content of the config-map
(add-query-params rule {{:keys [query-params]} :match-request})
Add any query parameters specified in configuration to the rule.
Add any query parameters specified in configuration to the rule.
(canonicalize-acl config-value)
Inputs: [config-value] Returns: acl/ACEConfig
Inputs: [config-value] Returns: acl/ACEConfig
(config->rule m)
Inputs: [m] Returns: rules/Rule
Given a rule expressed as a map in the configuration return a Rule suitable for use in a list with the allowed? function.
This assumes the configuration has been validated via
validate-auth-config-rule!
.
Inputs: [m] Returns: rules/Rule Given a rule expressed as a map in the configuration return a Rule suitable for use in a list with the allowed? function. This assumes the configuration has been validated via `validate-auth-config-rule!`.
(transform-config config)
Inputs: [config] Returns: [rules/Rule]
Transforms the (validated) authorization service config into a list of Rules
that work with the authorization code. Assumes config has been validated via
validate-auth-config!
.
Inputs: [config] Returns: [rules/Rule] Transforms the (validated) authorization service config into a list of Rules that work with the authorization code. Assumes config has been validated via `validate-auth-config!`.
(valid-method? rule)
Returns true if the given rule contains either a valid method, or no specified method.
Returns true if the given rule contains either a valid method, or no specified method.
HTTP methods which are allowed to be configured in a rule.
HTTP methods which are allowed to be configured in a rule.
(validate-ace-config-map! config-value)
Inputs: [config-value :- (schema/pred map? "map?")]
Inputs: [config-value :- (schema/pred map? "map?")]
(validate-auth-config! config)
Validates the given authorization service configuration. If an invalid configuration is found an IllegalArgumentException will be thrown, otherwise the input config will be returned.
Validates the given authorization service configuration. If an invalid configuration is found an IllegalArgumentException will be thrown, otherwise the input config will be returned.
(validate-auth-config-rule! rule)
Tests to see if the given map contains the proper data to define an auth rule. Returns the provided rule if successful, otherwise throws an exception with a useful error message.
Tests to see if the given map contains the proper data to define an auth rule. Returns the provided rule if successful, otherwise throws an exception with a useful error message.
(validate-regex-backreferences! rule)
Validates that allow and deny back-references actually exist as capture groups in the path regex. Throws an exception if a back-reference refers to a capture group that doesn't exist.
Validates that allow and deny back-references actually exist as capture groups in the path regex. Throws an exception if a back-reference refers to a capture group that doesn't exist.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close