Liking cljdoc? Tell your friends :D

opa.middleware


default-enforce-fnclj

(default-enforce-fn opa-response-body)
source

default-input-fnclj

(default-input-fn request)

Default function for building the input map sent to OPA. Contains:

:path - list of path components :method - request method (uppercase) :token - if found in authorization request header

Default function for building the input map sent to OPA. Contains:

:path   - list of path components
:method - request method (uppercase)
:token  - if found in authorization request header
sourceraw docstring

default-optionsclj

source

wrap-opa-authorizeclj

(wrap-opa-authorize handler)
(wrap-opa-authorize handler options)

Middleware for delegating authorization decisions to OPA and enforcing the decision returned. The options parameter is an optional map with the following keys provided as possible options:

:server-addr - address of server (default http://localhost:8181) :policy-path - path to authorization policy document (excluding /v1/data) :input-fn - function that takes the request and returns the input map to provide OPA :enforce-fn - function called on authorization failure - provided OPA response as single argument

Middleware for delegating authorization decisions to OPA and enforcing the
decision returned. The options parameter is an optional map with the following keys
provided as possible options:

:server-addr - address of server (default http://localhost:8181)
:policy-path - path to authorization policy document (excluding /v1/data)
:input-fn    - function that takes the request and returns the input map to provide OPA
:enforce-fn  - function called on authorization failure - provided OPA response as single argument 
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close