The library calls Redfly over HTTP/2 with the JDK client and verifies PASETO tokens against cached public keys; the plugin does the same in PHP with sodium.
Kotlin API
| Member | Purpose |
|---|---|
requestCode(phoneE164) | Ask Redfly to send a sign-in code |
verifyCode(phoneE164, code) | Returns signed in, or needs TOTP with a pending id |
verifyTotp(pendingId, totp) | Complete the second factor |
refresh(session) / logout(session) | Renew the token or end the session |
verify(token) | Check signature, exp and kid; throws on failure |
keys | Cached /v1/auth/keys, refetched on an unknown key id |
submit(events) | Batched telemetry, at most 500 per call |
Configuration
| Setting | Meaning |
|---|---|
baseUrl | Redfly HTTPS endpoint (REDFLY_BASE_URL) |
clientSecret | For WordPress sites and services; null for user-only use (REDFLY_CLIENT_SECRET_FILE) |
trustStore / keyStore | For mTLS when used inside the cluster |
REDFLY_CLIENT_KEY_PATH is retired: clients hold no signing keys.
A VerifiedToken carries userId, sessionId, tenants, app, expiresAt and tokenId. A TelemetryEvent carries eventId, ts, app, appVersion, tenantId, userHash, sessionHash, name, level, durationMs and attrs.
WordPress plugin behaviour
- Replaces the WordPress login form with phone and code, and TOTP if Redfly asks for it.
- Maps each Redfly user to a WordPress user by
redfly_user_iduser meta. - Verifies PASETO tokens locally with the cached Redfly public keys, cached in a transient for 1 hour and refetched on an unknown key id.
- Listens for nothing over Pulsar. It re-verifies on every request, so revocation takes effect within at most 15 minutes, the token lifetime.
- Submits pseudonymous telemetry events.
WordPress configuration
REDFLY_BASE_URLandREDFLY_CLIENT_SECRETare constants inwp-config.php, never stored in the database.- The admin page shows connection status and the telemetry on/off switch only.
- The plugin holds Redfly’s public key and a per-site client secret. It holds no signing keys.
- Updates are checked against a private endpoint with the
pre_set_site_transient_update_pluginsfilter.