Catacumba Api Documentation

Version: 2.2.1

catacumba.handlers.auth

Authentication and Authorization facilities for catacumba using funcool/buddy

auth

(auth & backends)

Authentication chain handler constructor.

IAuthentication

protocol

Protocol that defines unfied workflow steps for all authentication backends.

members

-authenticate

(-authenticate _ context token)

Given a request and parsed data (from previous step), tries authenticate the current request and return the user entity. This function should return a IPromise instance.

-parse

(-parse _ request)

Parse token (from cookie, session or any other http header) and return it.

jwe-backend

(jwe-backend {:keys [secret options token-name on-error], :or {token-name "Token"}})

The JWE (Json Web Encryption) based backend constructor.

jws-backend

(jws-backend {:keys [secret options token-name on-error], :or {token-name "Token"}})

The JWS (Json Web Signature) based backend constructor.

session-backend

(session-backend)

Given some options, create a new instance of Session backend and return it.