{"id":49383176,"url":"https://github.com/tokido-io/tokido-core","last_synced_at":"2026-04-28T07:01:39.852Z","repository":{"id":352296478,"uuid":"1214102309","full_name":"tokido-io/tokido-core","owner":"tokido-io","description":"Production-grade MFA toolkit for Java. TOTP, recovery codes, extensible factors. GraalVM native-image ready.","archived":false,"fork":false,"pushed_at":"2026-04-28T05:22:32.000Z","size":165,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-28T05:25:43.548Z","etag":null,"topics":["authentication","graalvm","java","mfa","security","totp","two-factor"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tokido-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-18T05:55:59.000Z","updated_at":"2026-04-28T05:22:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tokido-io/tokido-core","commit_stats":null,"previous_names":["tokido-io/tokido-core"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tokido-io/tokido-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokido-io%2Ftokido-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokido-io%2Ftokido-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokido-io%2Ftokido-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokido-io%2Ftokido-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tokido-io","download_url":"https://codeload.github.com/tokido-io/tokido-core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokido-io%2Ftokido-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32370030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","graalvm","java","mfa","security","totp","two-factor"],"created_at":"2026-04-28T07:01:38.377Z","updated_at":"2026-04-28T07:01:39.842Z","avatar_url":"https://github.com/tokido-io.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tokido-core\n\nProduction-grade MFA toolkit for Java. TOTP, recovery codes, extensible factors. GraalVM native-image ready.\n\n[![CI](https://github.com/tokido-io/tokido-core/actions/workflows/ci.yml/badge.svg)](https://github.com/tokido-io/tokido-core/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/tokido-io/tokido-core/graph/badge.svg)](https://codecov.io/gh/tokido-io/tokido-core)\n[![OIDC conformance](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/tokido-io/tokido-core/gh-pages/badges/conformance.json)](https://github.com/tokido-io/tokido-core/actions/workflows/oidc-conformance.yml)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n\n## Why tokido-core?\n\n- **Full enrollment lifecycle** — not just code verification, but enroll, confirm, verify, recover, and unenroll with audit events on every transition\n- **Pluggable secret storage** — you choose how secrets are stored and encrypted (KMS, Vault, local keystore). The library never makes that decision for you.\n- **GraalVM native-image ready** — no AWT, no runtime reflection. QR codes generated with pure `java.util.zip`.\n- **Zero framework dependencies** — works with Quarkus, Spring Boot, Micronaut, or plain Java\n- **Extensible factors** — TOTP and recovery codes ship in v1. Add WebAuthn, email OTP, or SMS by implementing `FactorProvider`.\n\n## OIDC extension status (in development — alpha)\n\nThe OIDC extension is being built across six releases (M0 → M5). The current release is **`0.1.0-M0`** — scaffolding and conformance harness only; no engine code yet.\n\n**OIDC basic conformance: 0/N** (M0 baseline — stub adapter returns `501 Not Implemented` for all endpoints; conformance pass-rate climbs as the engine implementation lands at M2 onward.)\n\n| Module | Introduced | API status | Coverage | Notes |\n|---|---|---|---|---|\n| `tokido-core-identity-api` | M0 | empty skeleton | n/a | SPIs and protocol value types land at M1 |\n| `tokido-core-identity-engine` | M0 | empty skeleton | n/a | Engine façade and handlers land at M1–M2 |\n| `tokido-core-identity-jwt` | M2 (placeholder pom in M0) | not yet introduced | n/a | Nimbus-backed JWT signing; lands at M2 |\n| `tokido-core-identity-broker` | M3 (placeholder pom in M0) | not yet introduced | n/a | OIDC RP federation; lands at M3 |\n| `tokido-core-identity-mfa` | M4 (placeholder pom in M0) | not yet introduced | n/a | Bridge to existing MFA modules; lands at M4 |\n\n\u003e Coverage gates are intentionally suppressed in M0 (modules contain no Java sources yet); they re-engage at M1 when SPIs and protocol value types land.\n\nThe release cadence and milestone definitions are documented in [ADR-0004](docs/adr/0004-release-cadence.md). See `docs/adr/` for the full architectural decision record.\n\n## Quick start\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.tokido\u003c/groupId\u003e\n    \u003cartifactId\u003etokido-core-engine\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.tokido\u003c/groupId\u003e\n    \u003cartifactId\u003etokido-core-totp\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003cscope\u003eruntime\u003c/scope\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.tokido\u003c/groupId\u003e\n    \u003cartifactId\u003etokido-core-recovery\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003cscope\u003eruntime\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n```java\n// 1. Plug in your secret store\nSecretStore store = new YourKmsSecretStore();\n\n// 2. Build the MFA manager\nMfaManager mfa = MfaManager.builder()\n    .secretStore(store)\n    .auditSink(event -\u003e log.info(\"mfa: {}\", event))\n    .factor(new TotpFactorProvider(TotpConfig.defaults().issuer(\"MyApp\"), store))\n    .factor(new RecoveryCodeProvider(store))\n    .build();\n\n// 3. Enroll a user\nTotpEnrollmentResult totp = mfa.enroll(userId, \"totp\", EnrollmentContext.empty());\n// totp.secretUri()    → otpauth://totp/...\n// totp.qrCodeBase64() → PNG QR code\n\n// 4. Confirm enrollment (user proves they scanned the QR)\nmfa.confirmEnrollment(userId, \"totp\", codeFromAuthenticatorApp);\n\n// 5. Generate recovery codes\nRecoveryEnrollmentResult recovery = mfa.enroll(userId, \"recovery\", EnrollmentContext.empty());\n// recovery.codes() → [\"04819237\", \"91847203\", ...] — show once\n\n// 6. Verify\nVerificationResult result = mfa.verify(userId, \"totp\", codeFromUser);\nif (!result.valid()) {\n    // Try recovery code\n    result = mfa.verify(userId, \"recovery\", recoveryCodeFromUser);\n}\n```\n\n## Modules\n\n| Module | Description | Dependencies |\n|--------|-------------|--------------|\n| `tokido-core-api` | SPIs and value types | none |\n| `tokido-core-engine` | `MfaManager` — enrollment lifecycle coordinator | `tokido-core-api` |\n| `tokido-core-totp` | TOTP factor with replay protection and QR generation | `tokido-core-api`, ZXing core |\n| `tokido-core-recovery` | Recovery codes with bcrypt hashing | `tokido-core-api`, jBCrypt |\n| `tokido-core-test` | `InMemorySecretStore` and `CollectingAuditSink` for testing | `tokido-core-api` |\n\n## Security model\n\ntokido-core **never stores or encrypts secrets**. You must provide a `SecretStore` implementation that handles encryption and persistence. This is a deliberate design choice:\n\n- The library can't accidentally leak plaintext secrets\n- You choose the encryption strategy (KMS envelope, Vault transit, local PKCS#12)\n- You choose the storage backend (database, S3, file system)\n- You own the key management lifecycle\n\nFor testing, use `InMemorySecretStore` from `tokido-core-test`.\n\n## Building\n\n```bash\ngit clone https://github.com/tokido-io/tokido-core.git\ncd tokido-core\nmvn verify\n```\n\nRequires Java 21+.\n\n## Coverage\n\nLine coverage is measured with [JaCoCo](https://www.jacoco.org/jacoco/) during `mvn verify` (minimum **90%** per module bundle). HTML reports are written under each module, for example `tokido-core-engine/target/site/jacoco/index.html`.\n\nCI publishes reports to [Codecov](https://codecov.io/gh/tokido-io/tokido-core) (interactive tree and history). The badge above tracks default-branch coverage; PRs get a diff once the repository is connected to Codecov.\n\n## Used in production by\n\n[Tokido](https://tokido.io) — MFA-as-a-Service platform\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nApache 2.0 — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftokido-io%2Ftokido-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftokido-io%2Ftokido-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftokido-io%2Ftokido-core/lists"}