Liking cljdoc? Tell your friends :D

oc.lib.api.common


allow-anonymousclj

(allow-anonymous ctx)

Allow unless there is a JWToken provided and it's invalid.

Allow unless there is a JWToken provided and it's invalid.
sourceraw docstring

allow-authenticatedclj

(allow-authenticated ctx)

Allow only if a valid JWToken is provided.

Allow only if a valid JWToken is provided.
sourceraw docstring

allow-id-tokenclj

(allow-id-token ctx)

Allow options request. Allow jwtoken. Allow id token. Allow anonymous.

Allow options request. Allow jwtoken. Allow id token. Allow anonymous.
sourceraw docstring

anonymous-resourceclj

(anonymous-resource passphrase)
source

authenticated?clj

(authenticated? ctx)

Return true if the request contains a valid JWToken

Return true if the request contains a valid JWToken
sourceraw docstring

base-authenticated-resourceclj

(base-authenticated-resource passphrase)
source

blank-responseclj

(blank-response)
source

error-responseclj

(error-response error status)
(error-response error status headers)

Helper to format a JSON ring response with an error.

Helper to format a JSON ring response with an error.
sourceraw docstring

forbiddenclj

source

forbidden-responseclj

(forbidden-response)
source

get-change-client-idclj

(get-change-client-id ctx)
source

get-client-id-from-contextclj

(get-client-id-from-context ctx service-key)
source

get-interaction-client-idclj

(get-interaction-client-id ctx)
source

get-notify-client-idclj

(get-notify-client-id ctx)
source

get-tokenclj

(get-token req)
source

good-jsonclj

source

handle-exceptionclj

(handle-exception ctx)
source

handle-unauthorizedclj

(handle-unauthorized ctx)
source

id-token-resourceclj

(id-token-resource passphrase)
source

json-mime-typeclj

source

json-responseclj

(json-response body status)
(json-response body status headers :guard map?)
(json-response body status mime-type :guard string?)
(json-response body
               :guard
               (fn* [p1__42392#]
                    (or (map? p1__42392#) (sequential? p1__42392#)))
               status
               mime-type
               headers)
(json-response body
               :guard
               string?
               status
               :guard
               integer?
               mime-type
               :guard
               string?
               headers
               :guard
               map?)

Helper to format a generic JSON body ring response

Helper to format a generic JSON body ring response
sourceraw docstring

jwt-resourceclj

(jwt-resource passphrase)
source

known-content-type?clj

(known-content-type? ctx content-type)
source

location-responseclj

(location-response location body media-type)
(location-response location body status media-type)
source

malformedclj

source

malformed-json?clj

(malformed-json? ctx)
(malformed-json? ctx allow-nil?)

Read in the body param from the request as a string, parse it into JSON, make sure all the keys are keywords, and then return it, mapped to :data as the 2nd value in a vector, with the first value indicating it's not malformed. Otherwise just indicate it's malformed.

Read in the body param from the request as a string, parse it into JSON, make sure all the
keys are keywords, and then return it, mapped to :data as the 2nd value in a vector,
with the first value indicating it's not malformed. Otherwise just indicate it's malformed.
sourceraw docstring

missing-responseclj

(missing-response)
(missing-response reason)
source

only-acceptclj

(only-accept status media-types :guard sequential?)
(only-accept status media-types :guard string?)
source

open-company-anonymous-resourceclj

(open-company-anonymous-resource passphrase)
source

open-company-authenticated-resourceclj

(open-company-authenticated-resource passphrase)
source

open-company-id-token-resourceclj

(open-company-id-token-resource passphrase)
source

open-company-resourceclj

source

options-responseclj

(options-response methods)
source

prod?clj

source

read-tokenclj

(read-token req passphrase)

Read supplied JWToken from the request headers.

If a valid token is supplied containing :super-user return :jwttoken and associated :user. If a valid id-token is supplied return a map containing :id-token and associated :user. If a valid token is supplied return a map containing :jwtoken and associated :user. If invalid token is supplied return a map containing :jwtoken and false. If no Authorization headers are supplied return nil.

Read supplied JWToken from the request headers.

If a valid token is supplied containing :super-user return :jwttoken and associated :user.
If a valid id-token is supplied return a map containing :id-token and associated :user.
If a valid token is supplied return a map containing :jwtoken and associated :user.
If invalid token is supplied return a map containing :jwtoken and false.
If no Authorization headers are supplied return nil.
sourceraw docstring

refresh-token-responseclj

(refresh-token-response)
source

refresh-token?clj

(refresh-token? ctx)
source

repclj

(rep v)

Add ^:replace meta to the value to avoid Liberator deep merge/concat it's value.

Add ^:replace meta to the value to avoid Liberator deep merge/concat
it's value.
sourceraw docstring

text-mime-typeclj

source

text-responseclj

(text-response body status)
(text-response body status headers)

Helper to format a text ring response

Helper to format a text ring response
sourceraw docstring

unauthorizedclj

source

unauthorized-responseclj

(unauthorized-response)
source

unprocessable-entity-responseclj

(unprocessable-entity-response reason)
source

UTF8clj

source

wrap-500clj

(wrap-500 handler)

Ring middleware to ensure that in the case of a 500 error response or an exception, we don't leak error details in the body of the response.

Ring middleware to ensure that in the case of a 500 error response or an exception, we don't leak error
details in the body of the response.
sourceraw docstring

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

× close