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.
raw docstring

allow-authenticatedclj

(allow-authenticated ctx)

Allow only if a valid JWToken is provided.

Allow only if a valid JWToken is provided.
raw 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.
raw docstring

anonymous-resourceclj

(anonymous-resource passphrase)

authenticated?clj

(authenticated? ctx)

Return true if the request contains a valid JWToken

Return true if the request contains a valid JWToken
raw docstring

base-authenticated-resourceclj

(base-authenticated-resource passphrase)

blank-responseclj

(blank-response)

error-msgclj


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.
raw docstring

forbiddenclj


forbidden-responseclj

(forbidden-response)

get-change-client-idclj

(get-change-client-id ctx)

get-client-id-from-contextclj

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

get-interaction-client-idclj

(get-interaction-client-id ctx)

get-notify-client-idclj

(get-notify-client-id ctx)

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.
raw docstring

good-jsonclj


handle-unauthorizedclj

(handle-unauthorized ctx)

help-emailclj


id-token-resourceclj

(id-token-resource passphrase)

json-mime-typeclj


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__37208#]
                    (or (map? p1__37208#) (sequential? p1__37208#)))
               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
raw docstring

jwt-resourceclj

(jwt-resource passphrase)

known-content-type?clj

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

location-responseclj

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

malformedclj


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.
raw docstring

missing-responseclj

(missing-response)
(missing-response reason)

only-acceptclj

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

open-company-anonymous-resourceclj

(open-company-anonymous-resource passphrase)

open-company-authenticated-resourceclj

(open-company-authenticated-resource passphrase)

open-company-id-token-resourceclj

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

open-company-resourceclj


options-responseclj

(options-response methods)

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.
raw docstring

refresh-token-responseclj

(refresh-token-response)

refresh-token?clj

(refresh-token? ctx)

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.
raw docstring

text-mime-typeclj


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

unauthorizedclj


unauthorized-responseclj

(unauthorized-response)

unprocessable-entity-responseclj

(unprocessable-entity-response reason)

UTF8clj


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.
raw docstring

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

× close