JWT Installation
Install the addon with the Keel CLI:
keel add jwtManual install is still possible:
go get github.com/slice-soft/ss-keel-jwtWhat keel add jwt changes
Section titled “What keel add jwt changes”- Adds
github.com/slice-soft/ss-keel-jwtto the project dependencies. - Creates
cmd/setup_jwt.go. - Injects
jwtProvider := setupJWT(app, appLogger)intocmd/main.go. - Adds config-facing property keys and
.envexamples for the JWT settings.
Generated config keys:
jwt.secret=${JWT_SECRET:change-me-in-production}jwt.issuer=${JWT_ISSUER:}jwt.token-ttl-hours=${JWT_TOKEN_TTL_HOURS:24}Generated env examples:
JWT_SECRET=change-me-in-productionJWT_ISSUER=JWT_TOKEN_TTL_HOURS=24Next step
Section titled “Next step”After installation, wire route protection with jwtProvider.Middleware() or continue to ss-keel-oauth if you want provider login flows on top of JWT issuance.