JWT
Haelnorr edited this page 2026-01-13 13:43:24 +11:00
Clone

Wiki Page Revisions

7 Commits

Author SHA1 Message Date
064884935b Squash merge hlogdoc into main 2026-01-13 13:43:24 +11:00
36fab33048 updated docs with links 2026-01-11 23:48:15 +11:00
3e2df6c850 Update JWT documentation for BeginTX pattern
Updated all code examples to reflect the new generator API that accepts
a BeginTX function instead of managing database connections directly.

Changes include:
- Updated Basic Setup example with txGetter function
- Updated Without Database example
- Updated GORM integration example
- Updated Bun integration example
- Updated Complete Example

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 22:15:30 +11:00
f9522e95b9 Add DBTransaction interface documentation for ORM support
Updated JWT documentation to reflect the new DBTransaction interface
that allows ORM transactions to be used directly with the JWT package.

Changes:
- Added explanation of DBTransaction interface
- Documented that *sql.Tx automatically implements the interface
- Added examples showing GORM transaction usage (tx.Statement.ConnPool)
- Added examples showing Bun transaction usage (bunDB.BeginTx)
- Updated validation and revocation sections with ORM examples
- Clarified that users can choose between ORM or standard transactions

Benefits:
- GORM users can use gormDB.Begin() and pass tx.Statement.ConnPool
- Bun users can use bunDB.BeginTx() and pass tx directly
- Standard library users continue using db.Begin() as before
- No need to extract/manage separate transactions for different libraries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 18:10:52 +11:00
f7025211be Update JWT documentation for new database interface
Updated all examples to reflect the simplified database API that uses
*sql.DB and *sql.Tx directly instead of custom wrapper interfaces.

Changes:
- Changed GeneratorConfig.DBConn to GeneratorConfig.DB (*sql.DB)
- Updated all transaction examples to use db.Begin() directly
- Removed references to jwt.NewDBConnection() wrapper
- Fixed GORM example to show correct usage with sqlDB
- Corrected Bun example - sql.DB should be created first, then passed
  to both Bun and JWT generator (previously showed incorrect usage)
- Updated complete example with proper transaction handling
- Simplified API makes it clearer how to integrate with ORMs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 17:41:18 +11:00
282b1f3d74 Update JWT documentation with correct API usage
- Updated all examples to use jwt.NewDBConnection() wrapper
- Fixed transaction handling to use gen.dbConn.BeginTx()
- Removed references to obsolete jwt.NewSQLExecutor()
- Added missing context imports
- Fixed variable naming in complete example
- Corrected DBConn type from *sql.DB to DBConnection interface

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 16:54:58 +11:00
f1799917d8 Add comprehensive JWT module documentation 2026-01-11 16:11:08 +11:00