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-msgclj

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-tokenclj

(get-token headers)

Read supplied JWToken from the Authorization in the request headers.

Return nil if no JWToken provided.

Read supplied JWToken from the Authorization in the request headers.

Return nil if no JWToken provided.
sourceraw docstring

good-jsonclj

source

help-emailclj

source

id-token-resourceclj

(id-token-resource passphrase)
source

json-mime-typeclj

source

json-responseclj

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

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

read-tokenclj

(read-token headers passphrase)

Read supplied JWToken from the request headers.

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 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

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