PortalEmailVerificationToken
A customer-portal email confirmation link: single use, stored as a SHA-256 of the emailed token.
| Table | portal_email_verification_tokens |
| Tenant-scoped | No — global table |
| Columns | 8 |
| Relationships | 0 |
| Source | backend/src/main/java/com/motorph/payroll/model/PortalEmailVerificationToken.java |
Not tenant-scoped
This entity does not extend TenantOwned, so its rows are shared across every tenant. TenantCoverageTest allows that only for tables deliberately declared global.
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
id | Long | id | Yes | — |
portalUserId | Integer | portal_user_id | — | — |
tenantId | Long | tenant_id | Yes | — |
tokenHash | String | token_hash | — | unique |
expiresAt | Instant | expires_at | — | — |
usedAt | Instant | used_at | Yes | — |
returnTo | String | return_to | Yes | The storefront page to send the customer back to once confirmed; a validated portal path or null. |
createdAt | Instant | created_at | — | — |
Repository
PortalEmailVerificationTokenRepository
Declared over PortalEmailVerificationToken with id type Long. Source: backend/src/main/java/com/motorph/payroll/repository/PortalEmailVerificationTokenRepository.java
| Method | Returns | Notes |
|---|---|---|
findByTokenHash(String tokenHash) | Optional<PortalEmailVerificationToken> | derived |
findFirstByPortalUserIdOrderByCreatedAtDesc(Integer portalUserId) | Optional<PortalEmailVerificationToken> | derived |
countByPortalUserIdAndCreatedAtAfter(Integer portalUserId, Instant since) | long | derived |
invalidateAllForUser(@Param("portalUserId") Integer portalUserId, @Param("now") Instant now) | void | explicit @Query, modifying |
Reached by
These controllers hold — directly or through a service they depend on — a repository over PortalEmailVerificationToken.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| PortalAuthController | /api/portal/auth | 6 | Inventory & Portal |
Generated page
This page is rebuilt from the source on every docs build by docs-site/scripts/gen-code-wiki.mjs. Editing it has no effect — change the code, or, if what you want to say is prose, write it in docs/.