Liking cljdoc? Tell your friends :D

co.gaiwan.oak.apis.assets

Static assets loaded from resources

Currently we're hard-coding specific asset routes. This isn't really scalable, but we shouldn't need many of them, and it means we don't end up serving things off the classpath or filesystem which we didn't intend to serve.

Static assets loaded from resources

Currently we're hard-coding specific asset routes. This isn't really scalable,
but we shouldn't need many of them, and it means we don't end up serving
things off the classpath or filesystem which we didn't intend to serve.
raw docstring

co.gaiwan.oak.apis.dashboard

Front page, some basic account management for the user

Front page, some basic account management for the user
raw docstring

co.gaiwan.oak.apis.jwks

JSON Web Key Set

Standard discoverable endpoint so third parties can validate our JWT tokens.

JSON Web Key Set

Standard discoverable endpoint so third parties can validate our JWT tokens.
raw docstring

co.gaiwan.oak.apis.oidc

OpenID connect implementation

These are only the OIDC-specific endpoints like discovery or userinfo. Much of the OIDC logic lives inside the OAuth2 implemenation.

OpenID connect implementation

These are only the OIDC-specific endpoints like discovery or userinfo. Much of
the OIDC logic lives inside the OAuth2 implemenation.
raw docstring

co.gaiwan.oak.apis.openapi

Standard API description

Standard API description
raw docstring

co.gaiwan.oak.apis.proxy

reverse proxy to load resources from 3rd website

reverse proxy to load resources from 3rd website
raw docstring

co.gaiwan.oak.apis.totp

2FA endpoints.

  • generate secret, store in session, show QR code
  • user adds it to their authenticator app
  • ask user for code from authenticator
  • if code is valid, store secret as credential, remove from session
2FA endpoints.
- generate secret, store in session, show QR code
- user adds it to their authenticator app
- ask user for code from authenticator
- if code is valid, store secret as credential, remove from session
raw docstring

co.gaiwan.oak.app.config

Configuration and system setup, mostly wrappers around lambdaisland.config and makina.

Configuration and system setup, mostly wrappers around lambdaisland.config and
makina.
raw docstring

co.gaiwan.oak.app.schema

Database schema

We automatically create missing tables/columns/indices when the database connection pool boots base on what's here.

Database schema

We automatically create missing tables/columns/indices when the database
connection pool boots base on what's here.
raw docstring

co.gaiwan.oak.domain.credential

Store credentials, like password hashes, authenticator app codes, OTP codes, nonces for passwordless login, API keys, etc

Store credentials, like password hashes, authenticator app codes, OTP codes,
nonces for passwordless login, API keys, etc
raw docstring

co.gaiwan.oak.domain.identifier

An identifier identifies an identity

Email, phone number, etc

An identifier identifies an identity

Email, phone number, etc
raw docstring

co.gaiwan.oak.domain.identity

Identity entity, can be a human identity, or non-human identity

Identity entity, can be a human identity, or non-human identity
raw docstring

co.gaiwan.oak.domain.jwt

Utility functions for creating/handling JWTs and JWT claims.

Both access tokens and ID tokens.

Utility functions for creating/handling JWTs and JWT claims.

Both access tokens and ID tokens.
raw docstring

co.gaiwan.oak.domain.oauth-authorization

Authorizations that have been granted through OAuth

Authorizations that have been granted through OAuth
raw docstring

co.gaiwan.oak.domain.oauth-code

Codes that can be exchanged in an oauth flow

Codes that can be exchanged in an oauth flow
raw docstring

co.gaiwan.oak.domain.refresh-token

Refresh tokens for OAuth flow

Refresh tokens for OAuth flow
raw docstring

co.gaiwan.oak.html.styles

Global CSS declarations

Global CSS declarations
raw docstring

co.gaiwan.oak.html.tokens

co.gaiwan.oak.lib.auth-middleware

Middleware which populates the :identity key in the request based on Bearer token or session

These need to be added to the (group of) route(s) that need them. If they are routes end-users access in their browser, session-auth makes sense. If they are routes the relying party calls with a bearer token, then bearer-auth makes sense. Routes that don't need these should not have them.

Middleware which populates the :identity key in the request based on Bearer
token or session

These need to be added to the (group of) route(s) that need them. If they are
routes end-users access in their browser, session-auth makes sense. If they
are routes the relying party calls with a bearer token, then bearer-auth makes
sense. Routes that don't need these should not have them.
raw docstring

co.gaiwan.oak.lib.automatic-schema

Automatic database schema evolution utilities

Automatic database schema evolution utilities
raw docstring

co.gaiwan.oak.lib.cli-error-mw

lambdaisland/cli middleware for convenient and pretty error handling

lambdaisland/cli middleware for convenient and pretty error handling
raw docstring

co.gaiwan.oak.lib.db

Convenience functions for next.jdbc/honeysql

Default to returning kebab-cased qualified maps.

Convenience functions for next.jdbc/honeysql

Default to returning kebab-cased qualified maps.
raw docstring

co.gaiwan.oak.lib.email

Handle (outgoing) email

Handle (outgoing) email
raw docstring

co.gaiwan.oak.lib.hato-charred

Monkey patch Hato to read/write JSON using Charred

Monkey patch Hato to read/write JSON using Charred
raw docstring

No vars found in this namespace.

co.gaiwan.oak.lib.password4j

Wrapper around password4j that can detect the hash type based on the Modular Crypt Format (MCF) prefix.

Pepper and other settings can be configured through Password4j's own mechanisms, -J-Dpsw4j.configuration=/my/path/to/password4j.properties

Wrapper around password4j that can detect the hash type based on the Modular
Crypt Format (MCF) prefix.

Pepper and other settings can be configured through Password4j's own mechanisms,
`-J-Dpsw4j.configuration=/my/path/to/password4j.properties`
raw docstring

co.gaiwan.oak.lib.pg-jsonb

PostgreSQL JSONB type handling for next.jdbc

PostgreSQL JSONB type handling for next.jdbc
raw docstring

co.gaiwan.oak.lib.ring-csp

Middleware that sets a CSP policy.

CSP policy is configured through :http/csp-policy. The special value nonce is replaced with nonce-<per-request-generated-nonce>, which can be accessed through *csp-nonce*

Middleware that sets a CSP policy.

CSP policy is configured through `:http/csp-policy`. The special value `nonce`
is replaced with `nonce-<per-request-generated-nonce>`, which can be accessed
through `*csp-nonce*`
raw docstring

co.gaiwan.oak.lib.time

Handle time format

Handle time format
raw docstring

co.gaiwan.oak.lib.totp

A library generate, verify time-based one time passwords for Multi-Factor Authentication.

A library generate, verify time-based one time passwords for
Multi-Factor Authentication.
raw docstring

co.gaiwan.oak.system.database

PostgreSQL connection pool + JSONB setup

PostgreSQL connection pool + JSONB setup
raw docstring

co.gaiwan.oak.system.handler

HTTP handler, Ring-based

HTTP handler, Ring-based
raw docstring

co.gaiwan.oak.system.http

HTTP server component

HTTP server component
raw docstring

co.gaiwan.oak.system.memory-store

Memory-based session store, used for testing

Memory-based session store, used for testing
raw docstring

co.gaiwan.oak.system.middleware

Global middleware, executes before reitit matches the request

Global middleware, executes before reitit matches the request
raw docstring

co.gaiwan.oak.system.security-providers

Allow adding Java security providers through configuration

E.g. you might want to set BouncyCastle as the default, for FIPS Compliance.

Config keys: :java.security.provider/prepend / :java.security.provider/append. Both take a collection of strings, which are either a class name (assuming a zero-arg constructor), or className/methodName, assuming a zero-arg static method for initialization (e.g. Conscrypt)

Allow adding Java security providers through configuration

E.g. you might want to set BouncyCastle as the default, for FIPS Compliance.

Config keys: `:java.security.provider/prepend` /
`:java.security.provider/append`. Both take a collection of strings, which are
either a class name (assuming a zero-arg constructor), or
className/methodName, assuming a zero-arg static method for
initialization (e.g. Conscrypt)
raw docstring

co.gaiwan.oak.util.base64

Convert between base64 and byte-arrays

Regular and URL varieties

Convert between base64 and byte-arrays

Regular and URL varieties
raw docstring

co.gaiwan.oak.util.bigint

Unopinioted BigInteger helpers

Unopinioted BigInteger helpers
raw docstring

co.gaiwan.oak.util.hash

Generic hashing utilities

Generic hashing utilities
raw docstring

co.gaiwan.oak.util.jose

A data-driven wrapper around nimbus-jose-jwt for Clojure.

Works with string-string maps.

A data-driven wrapper around nimbus-jose-jwt for Clojure.

Works with string-string maps.
raw docstring

co.gaiwan.oak.util.log

Provides a structured, key-value logging interface on top of Log4j2. Inspired by pedestal.log and lambdaisland.glogi.

Usage: (require '[co.gaiwan.oak.util.log :as log])

(log/info :app/starting {:port 8080 :env :prod}) (try (/ 1 0) (catch Exception e (log/error :db/query-failed :query "SELECT * FROM users" :exception e)))

Built to work with structured output, in particular JsonLayout

Provides a structured, key-value logging interface on top of Log4j2.
Inspired by pedestal.log and lambdaisland.glogi.

Usage:
  (require '[co.gaiwan.oak.util.log :as log])

  (log/info :app/starting {:port 8080 :env :prod})
  (try
    (/ 1 0)
    (catch Exception e
      (log/error :db/query-failed :query "SELECT * FROM users" :exception e)))

Built to work with structured output, in particular JsonLayout 
raw docstring

co.gaiwan.oak.util.random

Generate (secure) random things

Generate (secure) random things
raw docstring

co.gaiwan.oak.util.routing

Helpers related to the reitit router/routing

Helpers related to the reitit router/routing
raw docstring

co.gaiwan.oauth-tester

OAuth server implementation tester

Command line interface for testing OAuth server implementations.

OAuth server implementation tester

Command line interface for testing OAuth server implementations.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close