io.randomseed.utils.auth

added in 2.0.6

Random Utilities, authentication entry point.

check-password

(check-password password pwd-suites auth-config)(check-password password pwd-shared-suite pwd-user-suite auth-config)

Checks plain password against suite(s) using auth-config.

check-password-json

(check-password-json password json-pwd-suites auth-config)(check-password-json password json-pwd-shared-suite json-pwd-user-suite auth-config)

Checks plain password against JSON suite(s) using auth-config.

config

(config src)(config src _)

Returns authentication configuration.

init-auth

(init-auth k config)

Authentication configurator.

init-config

(init-config config)

Prepares authentication settings.

init-passwords

(init-passwords k config)(init-passwords k config log-fn)

Initializes password suite from config.

make-auth

(make-auth m)(make-auth k m)

Builds normalized auth config map with :id, :passwords and :locking.

make-locking

(make-locking m)

Builds AuthLocking record from auth config map.

make-password

(make-password password auth-config)

Creates encrypted password suite.

make-password-json

(make-password-json password auth-config)

Creates encrypted password suite in JSON form.

make-passwords

(make-passwords m)

Builds AuthPasswords record from passwords config map.

settings

(settings src)

Returns authentication settings map for a source src.

settings?

(settings? v)

Returns true when v can be treated as auth settings map.

setup

Holds the current authentication setup. Intended to be re-bound at init time.