Liking cljdoc? Tell your friends :D
Clojure only.

wagoe.user.ports

User module ports — persistence and service seams for the user domain.

Three repositories (users, sessions, audit log) and one service facade. The repositories are what an alternative backend implements; the service is what the rest of the framework calls.

Email, notifications, events and metrics are not here — email lives in libs/email, observability owns logging/metrics/audit.

User module ports — persistence and service seams for the user domain.

Three repositories (users, sessions, audit log) and one service facade.
The repositories are what an alternative backend implements; the service is
what the rest of the framework calls.

Email, notifications, events and metrics are not here — email lives in
libs/email, observability owns logging/metrics/audit.
raw docstring

IAccessExpirycljprotocol

Memberships and assignments that end (BOU-856). An assignment takes its end as :expires-at in insert-assignment. Once passed, every read of IUserGroupRepository leaves the row out; remove-expired deletes it.

Memberships and assignments that end (BOU-856). An assignment takes its end
as :expires-at in `insert-assignment`. Once passed, every read of
IUserGroupRepository leaves the row out; `remove-expired` deletes it.

insert-member-untilclj

(insert-member-until this group-id user-id expires-at)

remove-expiredclj

(remove-expired this now)
sourceraw docstring

IAccessExplaincljprotocol

explain-accessclj

(explain-access this user permission record)
source

IAdminLockcljprotocol

with-admins-lockedclj

(with-admins-locked this f)
source

IBackupCodescljprotocol

consume-backup-codeclj

(consume-backup-code this user code-hash)
source

IGrantOptionscljprotocol

grant-optionsclj

(grant-options this user permission scope)
source

IGroupMembershipcljprotocol

group-namesclj

(group-names this user)
source

ILoginAttemptscljprotocol

claim-login-attemptsclj

(claim-login-attempts this user-id n lockout)

release-login-attemptclj

(release-login-attempt this user-id unlock?)
source

ILoginLayoutcljprotocol

login-pageclj

(login-page this title body opts)
source

ILoginRedirectcljprotocol

login-pathclj

(login-path this user login-context)
source

IMfaPolicycljprotocol

mfa-required?clj

(mfa-required? this user login-context)
source

IProfileLayoutcljprotocol

profile-pageclj

(profile-page this title body opts)
source

IRightsPreviewcljprotocol

preview-changeclj

(preview-change this change)
source

IRoleAssignmentscljprotocol

all-assignmentsclj

(all-assignments this)
source

ITimeBoundAccesscljprotocol

add-group-member-untilclj

(add-group-member-until this group-id user-id expires-at)

expire-access!clj

(expire-access! this now)
source

IUserAccountRecoverycljprotocol

What an admin does for a user who cannot sign in. Each change is audited with the admin as actor.

What an admin does for a user who cannot sign in. Each change is audited
with the admin as actor.

reset-user-mfaclj

(reset-user-mfa this user-id)

unlock-userclj

(unlock-user this user-id)
sourceraw docstring

IUserAuditRepositorycljprotocol

Audit-log persistence. Entries are immutable once written.

Audit-log persistence. Entries are immutable once written.

create-audit-logclj

(create-audit-log this audit-entity)

find-audit-logsclj

(find-audit-logs this options)

find-audit-logs-by-userclj

(find-audit-logs-by-user this user-id options)
sourceraw docstring

IUserAuditRetentioncljprotocol

delete-audit-logs-beforeclj

(delete-audit-logs-before this cutoff)
source

IUserDeletioncljprotocol

delete-userclj

(delete-user this user-id)

delete-usersclj

(delete-users this user-ids opts)
source

IUserGroupRepositorycljprotocol

Groups, their members, managed roles and the roles assigned to groups. A group is {:id :name :description :created-at :updated-at}; a managed role {:id :name kw :description :permissions #{kw} :created-at :updated-at}; an assignment {:id :group-id :role kw :scope map :created-at}. Deleting a group or a user removes their memberships and, with a group, its assignments.

Groups, their members, managed roles and the roles assigned to groups. A
group is {:id :name :description :created-at :updated-at}; a managed role
{:id :name kw :description :permissions #{kw} :created-at :updated-at}; an
assignment {:id :group-id :role kw :scope map :created-at}. Deleting a
group or a user removes their memberships and, with a group, its
assignments.

any-non-admin-users?clj

(any-non-admin-users? this)

modify-roleclj

(modify-role this role)

ensure-tablesclj

(ensure-tables this)

insert-assignmentclj

(insert-assignment this assignment)

insert-memberclj

(insert-member this group-id user-id)

find-user-groupsclj

(find-user-groups this user-id)

find-groupclj

(find-group this group-id)

remove-roleclj

(remove-role this role-name)

find-legacy-viewersclj

(find-legacy-viewers this)

find-role-holdersclj

(find-role-holders this role-names)

remove-memberclj

(remove-member this group-id user-id)

modify-groupclj

(modify-group this group)

find-role-assignmentsclj

(find-role-assignments this role-name)

find-assignmentsclj

(find-assignments this group-id)

remove-groupclj

(remove-group this group-id)

mark-legacy-grant-migratedclj

(mark-legacy-grant-migrated this grant-id)

ensure-everyoneclj

(ensure-everyone this)

remove-assignmentclj

(remove-assignment this group-id assignment-id)

insert-groupclj

(insert-group this group)

insert-roleclj

(insert-role this role)

find-membersclj

(find-members this group-id)

find-legacy-grantsclj

(find-legacy-grants this)

find-groupsclj

(find-groups this)

find-user-assignmentsclj

(find-user-assignments this user-id group-names)

clear-legacy-rolesclj

(clear-legacy-roles this)

in-transactionclj

(in-transaction this f)

find-rolesclj

(find-roles this)
sourceraw docstring

IUserGroupServicecljprotocol

Groups of users and the roles assigned to them (ADR-041). A user's grants are the permissions of the roles of their groups: those they were added to, the built-in Everyone, and those the :group-membership hook names. Joining, leaving, a changed assignment and a changed managed role are audited for each user whose rights change; a change to Everyone once, for the actor. Nothing is cached: user-grants reads the database, so a change applies to the next request. The :admin role is separate and needs no group. Throws ex-infos carrying :type: :validation-error, :not-found, :conflict.

Groups of users and the roles assigned to them (ADR-041). A user's grants
are the permissions of the roles of their groups: those they were added
to, the built-in Everyone, and those the `:group-membership` hook names.
Joining, leaving, a changed assignment and a changed managed role are
audited for each user whose rights change; a change to Everyone once, for
the actor. Nothing is cached: `user-grants` reads the database, so a change
applies to the next request. The :admin role is separate and needs no
group. Throws ex-infos carrying :type: :validation-error, :not-found,
:conflict.

role-holdersclj

(role-holders this role-names)

update-groupclj

(update-group this group)

remove-group-roleclj

(remove-group-role this group-id assignment-id)

remove-group-grantclj

(remove-group-grant this group-id grant-id)

add-group-grantclj

(add-group-grant this group-id grant)

delete-groupclj

(delete-group this group-id)

create-roleclj

(create-role this role)

provider-membersclj

(provider-members this group-id)

get-groupclj

(get-group this group-id)

permission-holdersclj

(permission-holders this permission)

user-groupsclj

(user-groups this user)

create-groupclj

(create-group this group)

add-group-roleclj

(add-group-role this group-id assignment)

user-grantsclj

(user-grants this user)

add-group-memberclj

(add-group-member this group-id user-id)

import-groups!clj

(import-groups! this groups opts)

remove-group-memberclj

(remove-group-member this group-id user-id)

delete-roleclj

(delete-role this role-name)

update-roleclj

(update-role this role)

list-rolesclj

(list-roles this)

list-groupsclj

(list-groups this)
sourceraw docstring

IUserIdentityRepositorycljprotocol

Links between an account and an external sign-in: an OpenID Connect (issuer, subject) pair. An issuer never reuses a subject, so the pair names one person for good, where an email address can change hands.

Links between an account and an external sign-in: an OpenID Connect
(issuer, subject) pair. An issuer never reuses a subject, so the pair names
one person for good, where an email address can change hands.

find-identities-by-userclj

(find-identities-by-user this user-id)

find-identityclj

(find-identity this issuer subject)
(link-identity this identity)

touch-identityclj

(touch-identity this issuer subject at)
(unlink-identity this issuer subject)
sourceraw docstring

IUserRepositorycljprotocol

User persistence. Entities are kebab-case maps per wagoe.user.schema.

User persistence. Entities are kebab-case maps per wagoe.user.schema.

create-userclj

(create-user this user-entity)

find-user-by-emailclj

(find-user-by-email this email)

find-user-by-idclj

(find-user-by-id this user-id)

find-usersclj

(find-users this options)

hard-delete-userclj

(hard-delete-user this user-id)

soft-delete-userclj

(soft-delete-user this user-id)

update-userclj

(update-user this user-entity)
sourceraw docstring

IUserServicecljprotocol

User domain service — orchestrates the repositories, the auth shell and the audit trail. Every method may throw an ex-info carrying :type (ADR-022); the listed types are the ones callers branch on.

User domain service — orchestrates the repositories, the auth shell and
the audit trail. Every method may throw an ex-info carrying
:type (ADR-022); the listed types are the ones callers branch on.

logout-userclj

(logout-user this session-token)

list-audit-logsclj

(list-audit-logs this options)

change-passwordclj

(change-password this user-id current-password new-password)

get-user-by-idclj

(get-user-by-id this user-id)

update-user-profileclj

(update-user-profile this user-entity)

register-userclj

(register-user this user-data)

validate-sessionclj

(validate-session this session-token)

register-or-authenticate-userclj

(register-or-authenticate-user this user-data login-context)

claim-user-identityclj

(claim-user-identity this request)

get-audit-logs-for-userclj

(get-audit-logs-for-user this user-id options)

logout-user-everywhereclj

(logout-user-everywhere this user-id)

permanently-delete-userclj

(permanently-delete-user this user-id)

list-usersclj

(list-users this options)

deactivate-userclj

(deactivate-user this user-id)

authenticate-userclj

(authenticate-user this user-credentials)

get-user-sessionsclj

(get-user-sessions this user-id)

get-user-by-emailclj

(get-user-by-email this email)
sourceraw docstring

IUserSessionInvalidationcljprotocol

invalidate-user-sessionclj

(invalidate-user-session this user-id session-id)
source

IUserSessionRepositorycljprotocol

Session persistence. A session is active when it has not expired and has no :revoked-at; every read here filters on both.

Session persistence. A session is active when it has not expired and has no
:revoked-at; every read here filters on both.

create-sessionclj

(create-session this session-entity)

delete-sessions-expired-beforeclj

(delete-sessions-expired-before this cutoff)

find-all-sessionsclj

(find-all-sessions this)

find-session-by-tokenclj

(find-session-by-token this session-token)

find-sessions-by-userclj

(find-sessions-by-user this user-id)

invalidate-all-user-sessionsclj

(invalidate-all-user-sessions this user-id)

invalidate-sessionclj

(invalidate-session this session-token)

update-sessionclj

(update-session this session-entity)
sourceraw docstring

IUserSessionRevocationcljprotocol

revoke-sessions-exceptclj

(revoke-sessions-except this user-id keep-session-id)

revoke-user-sessionclj

(revoke-user-session this user-id session-id)
source

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