Skip to main content
Version: v1 (Current)

Reader Authentication

Readers are access-point devices, not attendees or administrators. Select the authentication flow for the actual reader type. The direct identifier/secret API exchange currently accepts active print_server readers only; it is not a universal login for app, BLE gateway or companion readers.

Prerequisites and setup​

  1. Use the intended team/project and an access point with the required device configuration.
  2. Through the authorized project reader controls, create/select a print-server reader, set its identifier/access code and make it active.
  3. Store the access code on that device's protected configuration. The identifier is not the numeric reader ID, and the access code alone is not an API bearer.
  4. Set token_expiration_days where exposed. The model accepts 1–365 days; an omitted value uses auth.guards.reader.token_expiration_days (default seven days).
  5. Verify the device's allowed operations and endpoint behavior before use. Authentication does not grant attendee-only workflows or unrestricted project access.

Administrator permissions for provisioning readers are separate from the resulting device's permissions. A browser app or BLE gateway must use its supported onboarding/pairing/authentication flow, not claim the print-server endpoint supports its type.

Discover the project​

On the serving portal, request:

GET /portal/info
Accept: application/json

The response includes team/project IDs, names and slugs, portal_id, and PWA configuration. Use those actual slugs for the next request. This is public context discovery; it does not sign in or prove that all pages are active/admitted. The portal middleware exempts this route from the ordinary portal access-code gate.

The current API route catalog does not register the previously documented /api/v1/portal/info?domain=... alternative. Use the portal route above; do not derive a functioning endpoint from an old example.

Exchange print-server credentials​

Use the deployment's API host (or supported portal API host) and project route:

POST /api/v1/projects/TEAM_SLUG/PROJECT_SLUG/readers/login
Content-Type: application/json
Accept: application/json

{
"identifier": "PRINT_SERVER_IDENTIFIER",
"secret": "PRINT_SERVER_ACCESS_CODE"
}

No existing bearer is required for this credential exchange. The server looks up an active print-server reader in that project and verifies its access code. Success returns token, expires_at, reader, access_point and project. Keep the complete issued token, including its ID/separator; do not replace it with the original access code.

The named portal.reader.login limiter defaults to 10 requests per minute per resolved IP, with deployment configuration able to change it. Honor 429/retry guidance. Invalid/inactive/wrong-type credentials return 401; malformed bodies return 422; unknown project context can return 404.

GET /api/v1/projects/TEAM_SLUG/PROJECT_SLUG/attendees
Authorization: Bearer READER_TOKEN
Accept: application/json

This header example requires an allowed reader operation. The token's * ability does not turn its AccessPointReader owner into a project key or administrator.

Reader operations and page access​

config/permissions.php defines reader_allowed_operations. The current base policy allows selected attendee reads/updates; access-point/reader, agenda, credential, group and badge-template reads; and particular print-job, social-post, reader-OTP and credential-type operations. Each controller can impose additional checks. Use the actual endpoint contract; do not infer every CRUD action from a model appearing in the allowlist.

An active reader can satisfy supported portal-page login within its own project. For attendee group evaluation it is a guest, so a reader does not inherit an attendee's groups. A page-bound request still needs the page's resource grants and audience checks.

For a supported page-bound API call, keep device identity and page context separate:

GET /api/v1/projects/TEAM_SLUG/PROJECT_SLUG/attendees
Authorization: Bearer READER_TOKEN
X-Portal-Page-Token: PAGE_KEY
Accept: application/json

Use the reader bearer returned by the credential exchange and that installed page's public key. Both must refer to the intended project; on the portal API the page must also belong to the serving portal. The reader allowlist applies, and supported endpoints consume the page's compiled restrictions. Check denied rows/fields and any legacy scoping exceptions. The bearer-only example above is for standalone reader operations; this example does not grant access to every attendee or page.

For a supported same-origin reader session, keep the established session cookies and use the runtime's page context. Do not put the identifier/access code in the bearer header or substitute a page key for a reader identity. Session transport and CSRF requirements remain separate from the device bearer flow. See Portal token context for obtaining the intended page key outside the runtime.

A reader token cannot start or answer an attendee-only quiz. For learner identity use the supported attendee flow; documentation quizzes use individual email verification.

Session login is a separate flow​

Where an active reader login method is configured on a portal, POST /auth/reader-login accepts method_id, identifier and secret. The reader authentication factory creates a reader session and the handler redirects toward a portal page. Preserve that web route's CSRF/session transport; it is not the JSON API token exchange above.

Reader OTP, app/companion pairing and BLE configuration have their own route/method contracts. Check the API reference and Access Control guide for the intended device. A displayed settings field or model type does not establish support for this password-style exchange.

Lifecycle, acceptance and diagnosis​

Reader API tokens expire at the issued expires_at. Reauthenticate through the supported flow when needed; do not make access codes public to avoid expiration. A reader may have multiple issued tokens, so replacing one device credential is not proof that every prior token has been revoked. Use authorized credential/device controls and verify the retired device's access.

Test a valid active print server, wrong access code, inactive reader, wrong reader type, another project, expired token, allowed and denied operations, and access to a login-only page. Verify /api/v1/me on the API host if supported in the deployment; the handler returns 403 for an inactive authenticated reader. Do not treat one successful discovery/login request as proof that badge printing, enrollment or offline queues work end to end.

Restricted global reader inspection​

System Access Point Readers at /system/access-point-readers spans device records across projects. It inherits system-host super-admin, two-factor, authenticated/verified account, team-context and password-confirmation gates. Its index/show controller does not add a per-project action policy; deployed ordinary-account and exact-record refusal still need acceptance. This inspection is separate from project pairing/provisioning, reader token exchange and actual admission/printing.

Locate the device and current record​

Use Name/Identifier, Project, Team, Access Zone, Connection, Pairing, Type, Platform, Last Connected and Last Seen. Default ordering is Updated descending, 25 rows with a 1–100 request page-size bound. Search covers reader name/identifier/platform, project name/slug, team name and access-zone name/slug. Filter by Pairing Status, Reader Type and Project; verify numeric IDs and returned project/team when names repeat. Direct filter parameters take precedence over decoded inline values. Invalid/nonarray filter JSON supplies no inline restrictions, and its operator is not a general search language.

The project selector lists projects with reader relations, not every possible project. Missing project/zone display can mean Unassigned/Unprovisioned; do not create a second reader to populate a label. One identifier can have historical records from earlier shows. Current resolution selects the newest non-archived row for that identifier; the source's live scope does not simply mean paired, active or healthy. Verify the exact reader ID and current-record flag before interpreting state or requesting recovery.

Separate connection, pairing and heartbeat​

Connection Online means the current row has a matching broker client session in the returned broker data. Offline means no matching session was returned; Broker unavailable means the broker lookup returned no usable inventory. Historical means this row is not the current resolved record, regardless of another session with the same identifier. These labels are not an attendee's logged-in state or proof of successful scans.

Pairing separately shows Unclaimed, Paired, Provisioned, Revoked or Archived. App heartbeat Connectivity is another signal: absent/expired cached payload is Offline; a payload with pending scans is Syncing, otherwise Online. The configured TTL is heartbeat interval times offline-after intervals (fallbacks 60 seconds × three), not a permanent last-seen database guarantee. Low battery compares the recorded level strictly below the configured threshold (fallback 20%); missing battery data is not a healthy measured battery. Check observation time, app type and actual signal before equating broker Online with heartbeat Online or treating cached Offline as a device diagnosis.

Inspect detail without treating it as a command​

Open the exact reader for Overview, Project, Device Data, Broker and History context. Inspect current-record/active state, pairing/provision times, device sync status, heartbeat/battery/network/pending scans, project/team/access zone and recorded device metadata. Last Connected, Last Seen and Last Heartbeat are different timestamps. Credential/code indicators report configured presence and expiry state; they are not a login test, disclosure of the secret or proof every credential is valid. OTP/access-code log counts are stored-history counts, not live sessions or approved sign-ins.

The detail also includes Configuration and Companion Control components for applicable readers, with separate config pull/push and command routes. Those actions are operational mutations, not status probes; index/show observations do not accept their authorization, delivery, idempotency or recovery. Use the authorized platform/device owner and private procedure for remote actions. Do not click a pull/push/command merely to validate the documentation or assume the whole detail page is read-only.

Verify readiness and recover discrepancies​

Retain exact reader ID/identifier, current/historical flag, team/project/zone, signal source, observation time and error before a recovery request. For a missing row, check filters/paging, identifier history and actual owning records. For contradictory connection and heartbeat, inspect broker availability, current identifier resolution, app heartbeat freshness and pending scans separately. Reload/refetch for a new observation; a previously loaded page is not a live physical-device test.

A provisioned/current/online row does not prove the reader has correct configuration, authorization, synchronized data, acknowledged commands or successful offline replay/admission/printing. Verify the intended controlled device workflow and allowed/denied operations through its owning guide. Preserve credential, pairing and device-recovery details privately; omit secrets, pairing codes, raw device metadata and sensitive identifiers from public reports. Revoked is not established as a permanent fleet-wide ban: current-row resolution and later bootstrap lifecycle have separate behavior. Have the owner reconcile the existing device/history rather than repeatedly pairing or revoking to fix a status label. No broker/device command, pairing, login, scan or token mutation was performed for this review.

Implementation evidence​

Reviewed against experience-portal 04c7d10048 on 2026-10-13: Api/Ver1/ReaderLoginController, ReaderLoginRequest, PortalInfoController, Portal/Auth/ReaderLoginController, AccessPointReader, BaseDashboardPolicy, PortalPageAccess, MeController, RateLimitServiceProvider, config/permissions.php, config/auth.php and the API/portal route files. This source review made no live reader login or customer-data request.

Global reader index/detail observation guidance was supplemented on 2026-10-15 at platform 3b48eb675f7c8e3c4f0b87d0cd613fa7fb371093. Device-config/remote-command routes remain separate pending reconciliation and acceptance; this supplement does not certify live broker, heartbeat, pairing or operational outcomes.