@withwiz/toolkit 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +235 -0
- package/README.md +57 -26
- package/dist/{chunk-V6YD53NH.js → chunk-23LQJYZN.js} +5 -2
- package/dist/{chunk-ZTRASVGZ.js → chunk-34L7HTM7.js} +1 -1
- package/dist/{chunk-GSUCBWML.js → chunk-3RK3MKAR.js} +5 -2
- package/dist/{chunk-6JXHXIEH.js → chunk-3UIKCS56.js} +2 -2
- package/dist/{chunk-MNYVAEXK.js → chunk-4ROIPF33.js} +16 -3
- package/dist/{chunk-DUIQUAHR.js → chunk-4TGPAUJV.js} +4 -4
- package/dist/{chunk-P4CZVRSG.js → chunk-4XPXZNBX.js} +18 -11
- package/dist/{chunk-LG3KM5V3.js → chunk-5I3EQHR4.js} +6 -2
- package/dist/chunk-63EKUOJH.js +72 -0
- package/dist/{chunk-N5VOFGF3.js → chunk-75UDFONR.js} +5 -4
- package/dist/{chunk-T4643SEW.js → chunk-7KIM5MHV.js} +4 -4
- package/dist/{chunk-TF5RJ5Q2.js → chunk-7S2PCYNT.js} +5 -5
- package/dist/{chunk-2SIBG5BG.js → chunk-7YWUKMZD.js} +7 -0
- package/dist/{chunk-7X2N4VZM.js → chunk-ATBYGPLP.js} +1 -1
- package/dist/{chunk-A74POWYY.js → chunk-B7AJJKOY.js} +1 -1
- package/dist/{chunk-HKW4JA45.js → chunk-BRBOGLFT.js} +10 -10
- package/dist/{chunk-ZFNIHVVA.js → chunk-BRFW2LL2.js} +5 -5
- package/dist/{chunk-I4NT6G2T.js → chunk-DRTJSTEV.js} +2 -2
- package/dist/{chunk-H5KYXSYZ.js → chunk-DVCGAI5N.js} +2 -12
- package/dist/{chunk-AV7ELXHG.js → chunk-E5TDIRBJ.js} +2 -2
- package/dist/{chunk-Q5ERE4M3.js → chunk-HGVPZSWW.js} +18 -13
- package/dist/{chunk-2QVDB6UO.js → chunk-HV6A6Z5R.js} +1 -1
- package/dist/chunk-ILMPKSWS.js +125 -0
- package/dist/{chunk-J5NLAZV2.js → chunk-JHUWZ6YW.js} +2 -2
- package/dist/{chunk-LON5THYQ.js → chunk-KLMKCYIN.js} +1 -1
- package/dist/{chunk-4KJZRI74.js → chunk-KWUOLKDO.js} +1 -1
- package/dist/{chunk-GJO2MPC3.js → chunk-LCYDMYZS.js} +1 -1
- package/dist/{chunk-UP3VFIVQ.js → chunk-LL3VWKY4.js} +1 -1
- package/dist/{chunk-IMAFMUZ7.js → chunk-LSS3GJUE.js} +3 -2
- package/dist/{chunk-2PFSRVVD.js → chunk-LWHLB2Y6.js} +84 -18
- package/dist/{chunk-BBE4RXR7.js → chunk-MTZXWVW3.js} +17 -6
- package/dist/{chunk-ORMEWXMH.js → chunk-N3ETBM74.js} +1 -14
- package/dist/{chunk-UKPMQBU2.js → chunk-N3TCQ5BF.js} +6 -5
- package/dist/{chunk-TMTN7H46.js → chunk-NLV7IEYM.js} +7 -6
- package/dist/{chunk-P2VPYAJZ.js → chunk-NTZBMWB6.js} +6 -6
- package/dist/{chunk-ZVGEGDYF.js → chunk-OII5BXCZ.js} +1 -1
- package/dist/{chunk-2JGSS4RM.js → chunk-PRPMEHRE.js} +2 -2
- package/dist/{chunk-KG65BFPK.js → chunk-QAIN3WNN.js} +1 -1
- package/dist/{chunk-2MYD2BFJ.js → chunk-R7EFDSPZ.js} +7 -7
- package/dist/{chunk-VJE4HA2C.js → chunk-RWCPRPEP.js} +3 -2
- package/dist/{chunk-4YDBQZ5M.js → chunk-SCAFDDJP.js} +14 -14
- package/dist/{chunk-KXYDTC4A.js → chunk-SNFPZD6L.js} +11 -2
- package/dist/{chunk-BL6QHL5L.js → chunk-SXBDP3CK.js} +3 -3
- package/dist/{chunk-B5VRZ2VJ.js → chunk-TNDEYJEL.js} +25 -6
- package/dist/{chunk-Q4XDPK5B.js → chunk-TRGFXIEF.js} +3 -3
- package/dist/{chunk-VNDL2E44.js → chunk-U52U5SK7.js} +2 -2
- package/dist/{chunk-3KYSGBVF.js → chunk-UWOWKOOQ.js} +5 -3
- package/dist/{chunk-TQ3XHHZK.js → chunk-V3WZFUY3.js} +9 -9
- package/dist/{chunk-5BBVV2EX.js → chunk-VH57Y5Z4.js} +1 -1
- package/dist/{chunk-5S7M2AJL.js → chunk-VWAB4PM7.js} +1 -1
- package/dist/{chunk-AQZPGOEZ.js → chunk-VWKZMGPJ.js} +5 -4
- package/dist/{chunk-4K27YLAE.js → chunk-VZ2PQA4U.js} +2 -2
- package/dist/{chunk-ZOWEW4GY.js → chunk-WBHX4MJV.js} +2 -2
- package/dist/{chunk-UMRKMF3E.js → chunk-WXOWI7BJ.js} +2 -2
- package/dist/chunk-XAGPZLRK.js +106 -0
- package/dist/{chunk-AWIORJAI.js → chunk-XF3WUF3F.js} +2 -2
- package/dist/{chunk-M5ZYAQBB.js → chunk-XKIBJJA3.js} +28 -24
- package/dist/{chunk-ZLYBY3R4.js → chunk-XTGS6JJB.js} +10 -5
- package/dist/{chunk-KCDJIW2F.js → chunk-XXPB4C37.js} +5 -5
- package/dist/{chunk-LUIYCIF7.js → chunk-Y4ME3Q5K.js} +2 -2
- package/dist/{chunk-Q66VOVGN.js → chunk-Y4WPEIKW.js} +1 -1
- package/dist/{chunk-TUA5XW5Z.js → chunk-Y6CPPBJI.js} +1 -1
- package/dist/{chunk-PRWWB4QY.js → chunk-ZEHNCHIV.js} +2 -2
- package/dist/{chunk-D73ZJQMX.js → chunk-ZZABL54F.js} +13 -0
- package/dist/core/auth/config.d.ts +3 -0
- package/dist/core/auth/config.js +3 -3
- package/dist/core/auth/email/index.d.ts +3 -3
- package/dist/core/auth/email/index.js +3 -3
- package/dist/core/auth/email/sender.d.ts +1 -1
- package/dist/core/auth/email/sender.js +2 -2
- package/dist/core/auth/email/token-generator.d.ts +11 -0
- package/dist/core/auth/email/token-generator.js +2 -2
- package/dist/core/auth/errors/index.js +1 -1
- package/dist/core/auth/index.d.ts +11 -11
- package/dist/core/auth/index.js +24 -16
- package/dist/core/auth/jwt/client.js +3 -2
- package/dist/core/auth/jwt/cookie.d.ts +1 -1
- package/dist/core/auth/jwt/cookie.js +4 -4
- package/dist/core/auth/jwt/index.d.ts +41 -9
- package/dist/core/auth/jwt/index.js +6 -6
- package/dist/core/auth/jwt/types.d.ts +1 -1
- package/dist/core/auth/jwt/types.js +1 -1
- package/dist/core/auth/oauth/index.d.ts +6 -6
- package/dist/core/auth/oauth/index.js +5 -5
- package/dist/core/auth/oauth/providers/github.d.ts +1 -1
- package/dist/core/auth/oauth/providers/github.js +1 -1
- package/dist/core/auth/oauth/providers/google.d.ts +1 -1
- package/dist/core/auth/oauth/providers/google.js +1 -1
- package/dist/core/auth/oauth/providers/index.d.ts +5 -5
- package/dist/core/auth/oauth/providers/index.js +4 -4
- package/dist/core/auth/oauth/providers/kakao.d.ts +1 -1
- package/dist/core/auth/oauth/providers/kakao.js +1 -1
- package/dist/core/auth/oauth/providers/meta.d.ts +1 -1
- package/dist/core/auth/oauth/providers/meta.js +1 -1
- package/dist/core/auth/oauth/providers/microsoft.d.ts +1 -1
- package/dist/core/auth/oauth/providers/microsoft.js +1 -1
- package/dist/core/auth/oauth/state-cookie.js +1 -1
- package/dist/core/auth/password/client-helper.d.ts +9 -9
- package/dist/core/auth/password/client-helper.js +5 -3
- package/dist/core/auth/password/hasher.d.ts +83 -0
- package/dist/core/auth/password/hasher.js +14 -0
- package/dist/core/auth/password/index.d.ts +8 -6
- package/dist/core/auth/password/index.js +11 -2
- package/dist/core/auth/services/email-verification.service.d.ts +1 -1
- package/dist/core/auth/services/email-verification.service.js +3 -3
- package/dist/core/auth/services/index.d.ts +13 -12
- package/dist/core/auth/services/index.js +16 -16
- package/dist/core/auth/services/login.service.d.ts +15 -1
- package/dist/core/auth/services/login.service.js +6 -6
- package/dist/core/auth/services/oauth-callback.service.d.ts +7 -1
- package/dist/core/auth/services/oauth-callback.service.js +6 -6
- package/dist/core/auth/services/password-reset.service.d.ts +1 -1
- package/dist/core/auth/services/password-reset.service.js +3 -3
- package/dist/core/auth/services/refresh-token-store.d.ts +39 -0
- package/dist/core/auth/services/register.service.d.ts +1 -1
- package/dist/core/auth/services/register.service.js +3 -3
- package/dist/core/auth/services/token-refresh.service.d.ts +27 -1
- package/dist/core/auth/services/token-refresh.service.js +6 -6
- package/dist/core/auth/token-delivery.d.ts +47 -0
- package/dist/core/auth/token-delivery.js +14 -0
- package/dist/core/auth/types/index.d.ts +38 -4
- package/dist/core/auth/types/index.js +1 -1
- package/dist/core/cache/cache-config.js +5 -5
- package/dist/core/cache/cache-defaults.js +1 -1
- package/dist/core/cache/cache-env.d.ts +3 -3
- package/dist/core/cache/cache-env.js +4 -4
- package/dist/core/cache/cache-factory.d.ts +6 -6
- package/dist/core/cache/cache-factory.js +12 -12
- package/dist/core/cache/cache-invalidation.d.ts +4 -4
- package/dist/core/cache/cache-invalidation.js +13 -13
- package/dist/core/cache/cache-redis.js +6 -6
- package/dist/core/cache/cache-types.js +1 -1
- package/dist/core/cache/cache-wrapper.d.ts +1 -1
- package/dist/core/cache/cache-wrapper.js +13 -13
- package/dist/core/cache/cache.d.ts +2 -2
- package/dist/core/cache/cache.js +25 -25
- package/dist/core/cache/config.js +3 -3
- package/dist/core/cache/hybrid-cache-manager.d.ts +1 -1
- package/dist/core/cache/hybrid-cache-manager.js +8 -8
- package/dist/core/cache/index.d.ts +15 -15
- package/dist/core/cache/index.js +25 -25
- package/dist/core/cache/inmemory-cache-manager.d.ts +1 -1
- package/dist/core/cache/inmemory-cache-manager.js +3 -3
- package/dist/core/cache/noop-cache-manager.d.ts +1 -1
- package/dist/core/cache/noop-cache-manager.js +6 -6
- package/dist/core/cache/redis-cache-manager.d.ts +2 -2
- package/dist/core/cache/redis-cache-manager.js +7 -7
- package/dist/core/config/common.js +1 -1
- package/dist/core/config/errors.js +1 -1
- package/dist/core/config/registry.d.ts +7 -7
- package/dist/core/config/registry.js +1 -1
- package/dist/core/config/warn.js +1 -1
- package/dist/core/constants/error-codes.js +1 -1
- package/dist/core/constants/index.d.ts +5 -5
- package/dist/core/constants/index.js +17 -15
- package/dist/core/constants/messages.js +1 -1
- package/dist/core/constants/pagination.js +1 -1
- package/dist/core/constants/security.d.ts +15 -0
- package/dist/core/constants/security.js +4 -2
- package/dist/core/constants/validation.js +1 -1
- package/dist/core/cors/index.js +1 -1
- package/dist/core/error/app-error.d.ts +2 -2
- package/dist/core/error/app-error.js +1 -1
- package/dist/core/error/extract-error-info.js +1 -1
- package/dist/core/error/friendly-messages-v2.d.ts +3 -3
- package/dist/core/error/friendly-messages-v2.js +4 -4
- package/dist/core/error/friendly-messages.js +1 -1
- package/dist/core/error/index.d.ts +6 -6
- package/dist/core/error/index.js +7 -7
- package/dist/core/error/messages/en.d.ts +1 -1
- package/dist/core/error/messages/en.js +1 -1
- package/dist/core/error/messages/index.d.ts +2 -2
- package/dist/core/error/messages/index.js +3 -3
- package/dist/core/error/messages/ko.d.ts +1 -1
- package/dist/core/error/messages/ko.js +1 -1
- package/dist/core/geolocation/batch-processor.d.ts +1 -1
- package/dist/core/geolocation/batch-processor.js +3 -3
- package/dist/core/geolocation/config.js +1 -1
- package/dist/core/geolocation/index.d.ts +5 -5
- package/dist/core/geolocation/index.js +3 -3
- package/dist/core/geolocation/providers/base-provider.d.ts +2 -2
- package/dist/core/geolocation/providers/base-provider.js +1 -1
- package/dist/core/geolocation/providers/index.d.ts +6 -6
- package/dist/core/geolocation/providers/index.js +1 -1
- package/dist/core/geolocation/providers/ip-api-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/ip-api-provider.js +1 -1
- package/dist/core/geolocation/providers/ipapi-co-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/ipapi-co-provider.js +1 -1
- package/dist/core/geolocation/providers/ipgeolocation-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/ipgeolocation-provider.js +1 -1
- package/dist/core/geolocation/providers/maxmind-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/maxmind-provider.js +1 -1
- package/dist/core/logger/config.js +1 -1
- package/dist/core/logger/logger.js +2 -2
- package/dist/core/storage/config.js +1 -1
- package/dist/core/storage/r2-storage.js +2 -2
- package/dist/core/system/cpu.d.ts +1 -1
- package/dist/core/system/cpu.js +4 -4
- package/dist/core/system/disk.d.ts +1 -1
- package/dist/core/system/disk.js +4 -4
- package/dist/core/system/environment.d.ts +1 -1
- package/dist/core/system/environment.js +8 -8
- package/dist/core/system/health-check.d.ts +2 -2
- package/dist/core/system/health-check.js +6 -6
- package/dist/core/system/index.d.ts +7 -7
- package/dist/core/system/index.js +16 -16
- package/dist/core/system/memory.d.ts +1 -1
- package/dist/core/system/memory.js +4 -4
- package/dist/core/system/network.d.ts +1 -1
- package/dist/core/system/network.js +4 -4
- package/dist/core/system/utils.js +3 -3
- package/dist/core/types/geoip.d.ts +1 -1
- package/dist/core/types/qr-code.js +1 -1
- package/dist/core/utils/error-message-formatter.js +1 -1
- package/dist/core/utils/format-number.js +1 -1
- package/dist/core/utils/index.d.ts +3 -3
- package/dist/core/utils/index.js +2 -2
- package/dist/core/utils/input-validation.js +52 -16
- package/dist/core/utils/ip-utils.js +1 -1
- package/dist/core/utils/optimistic-lock.js +1 -1
- package/dist/core/utils/sanitizer.js +2 -2
- package/dist/core/utils/short-code-generator.js +1 -1
- package/dist/core/utils/timezone.js +121 -14
- package/dist/core/utils/type-guards.js +1 -1
- package/dist/core/utils/url-normalizer.js +1 -1
- package/dist/core/validators/index.d.ts +1 -1
- package/dist/core/validators/index.js +2 -2
- package/dist/core/validators/password-validator.d.ts +3 -3
- package/dist/core/validators/password-validator.js +2 -2
- package/dist/initialize.d.ts +10 -10
- package/dist/initialize.js +9 -9
- package/dist/next/auth-handlers/forgot-password.handler.d.ts +1 -1
- package/dist/next/auth-handlers/forgot-password.handler.js +4 -4
- package/dist/next/auth-handlers/index.d.ts +11 -11
- package/dist/next/auth-handlers/index.js +28 -27
- package/dist/next/auth-handlers/login.handler.d.ts +1 -1
- package/dist/next/auth-handlers/login.handler.js +7 -6
- package/dist/next/auth-handlers/logout.handler.d.ts +1 -1
- package/dist/next/auth-handlers/logout.handler.js +5 -5
- package/dist/next/auth-handlers/me.handler.d.ts +1 -1
- package/dist/next/auth-handlers/me.handler.js +7 -6
- package/dist/next/auth-handlers/oauth-authorize.handler.d.ts +1 -1
- package/dist/next/auth-handlers/oauth-authorize.handler.js +4 -4
- package/dist/next/auth-handlers/oauth-callback.handler.d.ts +1 -1
- package/dist/next/auth-handlers/oauth-callback.handler.js +9 -9
- package/dist/next/auth-handlers/refresh.handler.d.ts +1 -1
- package/dist/next/auth-handlers/refresh.handler.js +8 -7
- package/dist/next/auth-handlers/register.handler.d.ts +1 -1
- package/dist/next/auth-handlers/register.handler.js +4 -4
- package/dist/next/auth-handlers/reset-password.handler.d.ts +1 -1
- package/dist/next/auth-handlers/reset-password.handler.js +4 -4
- package/dist/next/auth-handlers/verify-email.handler.d.ts +1 -1
- package/dist/next/auth-handlers/verify-email.handler.js +4 -4
- package/dist/next/auth-types/handler-types.d.ts +5 -1
- package/dist/next/auth-types/handler-types.js +13 -1
- package/dist/next/auth-types/index.d.ts +1 -1
- package/dist/next/auth-types/index.js +13 -1
- package/dist/next/error/error-handler.js +5 -5
- package/dist/next/error/index.d.ts +3 -3
- package/dist/next/error/index.js +9 -9
- package/dist/next/error/locale-detector.d.ts +1 -1
- package/dist/next/error/locale-detector.js +1 -1
- package/dist/next/middleware/auth.d.ts +3 -3
- package/dist/next/middleware/auth.js +10 -9
- package/dist/next/middleware/cors.d.ts +2 -2
- package/dist/next/middleware/cors.js +3 -3
- package/dist/next/middleware/error-handler.d.ts +1 -1
- package/dist/next/middleware/error-handler.js +9 -9
- package/dist/next/middleware/index.d.ts +11 -11
- package/dist/next/middleware/index.js +23 -22
- package/dist/next/middleware/init-request.d.ts +1 -1
- package/dist/next/middleware/init-request.js +1 -1
- package/dist/next/middleware/middleware-chain.d.ts +1 -1
- package/dist/next/middleware/middleware-chain.js +3 -3
- package/dist/next/middleware/rate-limit.d.ts +2 -2
- package/dist/next/middleware/rate-limit.js +4 -4
- package/dist/next/middleware/response-logger.d.ts +1 -1
- package/dist/next/middleware/response-logger.js +3 -3
- package/dist/next/middleware/security.d.ts +1 -1
- package/dist/next/middleware/security.js +3 -3
- package/dist/next/middleware/types.d.ts +6 -3
- package/dist/next/middleware/wrappers.d.ts +2 -2
- package/dist/next/middleware/wrappers.js +21 -20
- package/dist/next/utils/api-helpers.d.ts +6 -2
- package/dist/next/utils/api-helpers.js +3 -2
- package/dist/next/utils/cors.js +2 -2
- package/dist/next/utils/csv-export-format.d.ts +11 -0
- package/dist/next/utils/csv-export-format.js +15 -0
- package/dist/next/utils/csv-export.d.ts +0 -2
- package/dist/next/utils/csv-export.js +3 -3
- package/dist/next/utils/error-processor.d.ts +1 -1
- package/dist/next/utils/error-processor.js +4 -4
- package/dist/next/utils/index.d.ts +5 -5
- package/dist/next/utils/index.js +21 -20
- package/dist/prisma/auth-adapter/index.d.ts +1 -1
- package/dist/prisma/auth-adapter/index.js +1 -1
- package/package.json +95 -51
- package/dist/chunk-2P4N4OK2.js +0 -150
- package/dist/chunk-4IQWQSEV.js +0 -27
- package/dist/chunk-4K76HG4V.js +0 -34
- package/dist/chunk-7EXSMZ2O.js +0 -29
- package/dist/chunk-7VXRBTRF.js +0 -110
- package/dist/chunk-ARXUKGZI.js +0 -58
- package/dist/chunk-B5OH43PR.js +0 -31
- package/dist/chunk-BW4QO7T6.js +0 -56
- package/dist/chunk-C6WH7RF5.js +0 -117
- package/dist/chunk-EK4TL7VW.js +0 -22
- package/dist/chunk-GPOSTBDQ.js +0 -193
- package/dist/chunk-IRUFNC4L.js +0 -26
- package/dist/chunk-J2MAXMIP.js +0 -105
- package/dist/chunk-MFMQO6IS.js +0 -127
- package/dist/chunk-NIWVKN6A.js +0 -81
- package/dist/chunk-OO2XOASJ.js +0 -240
- package/dist/chunk-PBQGXOVX.js +0 -31
- package/dist/chunk-STMAKLLG.js +0 -24
- package/dist/chunk-WP233RH2.js +0 -80
- package/dist/chunk-WWOYFWFB.js +0 -137
- package/dist/chunk-X7FGBUA4.js +0 -117
- package/dist/chunk-YSPIFSDI.js +0 -136
- package/dist/react/components/ui/Alert.d.ts +0 -12
- package/dist/react/components/ui/Alert.js +0 -10
- package/dist/react/components/ui/Badge.d.ts +0 -7
- package/dist/react/components/ui/Badge.js +0 -8
- package/dist/react/components/ui/Button.d.ts +0 -7
- package/dist/react/components/ui/Button.js +0 -8
- package/dist/react/components/ui/DataTable.d.ts +0 -8
- package/dist/react/components/ui/DataTable.js +0 -22
- package/dist/react/components/ui/DomainDisplay.d.ts +0 -12
- package/dist/react/components/ui/DomainDisplay.js +0 -31
- package/dist/react/components/ui/Input.d.ts +0 -5
- package/dist/react/components/ui/Input.js +0 -8
- package/dist/react/components/ui/Label.d.ts +0 -5
- package/dist/react/components/ui/Label.js +0 -8
- package/dist/react/components/ui/Pagination.d.ts +0 -42
- package/dist/react/components/ui/Pagination.js +0 -20
- package/dist/react/components/ui/Select.d.ts +0 -15
- package/dist/react/components/ui/Select.js +0 -27
- package/dist/react/components/ui/Skeleton.d.ts +0 -6
- package/dist/react/components/ui/Skeleton.js +0 -8
- package/dist/react/components/ui/TimezoneDisplay.d.ts +0 -22
- package/dist/react/components/ui/TimezoneDisplay.js +0 -83
- package/dist/react/components/ui/Tooltip.d.ts +0 -21
- package/dist/react/components/ui/Tooltip.js +0 -94
- package/dist/react/components/ui/data-table/DataTable.d.ts +0 -2
- package/dist/react/components/ui/data-table/DataTable.js +0 -22
- package/dist/react/components/ui/data-table/DataTableBody.d.ts +0 -19
- package/dist/react/components/ui/data-table/DataTableBody.js +0 -10
- package/dist/react/components/ui/data-table/DataTableBulkActions.d.ts +0 -17
- package/dist/react/components/ui/data-table/DataTableBulkActions.js +0 -12
- package/dist/react/components/ui/data-table/DataTableFilters.d.ts +0 -15
- package/dist/react/components/ui/data-table/DataTableFilters.js +0 -13
- package/dist/react/components/ui/data-table/DataTablePagination.d.ts +0 -10
- package/dist/react/components/ui/data-table/DataTablePagination.js +0 -11
- package/dist/react/components/ui/data-table/DataTableSearch.d.ts +0 -24
- package/dist/react/components/ui/data-table/DataTableSearch.js +0 -12
- package/dist/react/components/ui/data-table/index.d.ts +0 -13
- package/dist/react/components/ui/data-table/index.js +0 -42
- package/dist/react/components/ui/data-table/types.d.ts +0 -120
- package/dist/react/components/ui/data-table/types.js +0 -9
- package/dist/react/components/ui/loading-bar.d.ts +0 -20
- package/dist/react/components/ui/loading-bar.js +0 -15
- package/dist/react/error/error-display.d.ts +0 -48
- package/dist/react/error/error-display.js +0 -30
- package/dist/react/error/index.d.ts +0 -6
- package/dist/react/error/index.js +0 -30
- package/dist/react/hooks/useDataTable.d.ts +0 -96
- package/dist/react/hooks/useDataTable.js +0 -151
- package/dist/react/hooks/useDebounce.d.ts +0 -7
- package/dist/react/hooks/useDebounce.js +0 -7
- package/dist/react/hooks/useExitIntent.d.ts +0 -35
- package/dist/react/hooks/useExitIntent.js +0 -72
- package/dist/react/hooks/useTimezone.d.ts +0 -19
- package/dist/react/hooks/useTimezone.js +0 -11
- package/dist/react/utils/client-utils.d.ts +0 -3
- package/dist/react/utils/client-utils.js +0 -9
- package/dist/react/utils/qr-code.d.ts +0 -16
- package/dist/react/utils/qr-code.js +0 -215
- package/dist/{chunk-7PEVOMBO.js → chunk-AOWUPAPS.js} +0 -0
- package/dist/{chunk-V3GEYUBG.js → chunk-ER6LSA4M.js} +3 -3
- package/dist/{chunk-7WG7XPXC.js → chunk-KKZCNF6U.js} +3 -3
- /package/dist/{chunk-M22Z2NO6.js → core/auth/services/refresh-token-store.js} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Argon2idPasswordHasher,
|
|
3
|
+
BcryptPasswordHasher,
|
|
4
|
+
MigratingPasswordHasher,
|
|
5
|
+
__resetArgon2Cache
|
|
6
|
+
} from "../../../chunk-ILMPKSWS.js";
|
|
7
|
+
import "../../../chunk-5GWGARXI.js";
|
|
8
|
+
import "../../../chunk-N3ETBM74.js";
|
|
9
|
+
export {
|
|
10
|
+
Argon2idPasswordHasher,
|
|
11
|
+
BcryptPasswordHasher,
|
|
12
|
+
MigratingPasswordHasher,
|
|
13
|
+
__resetArgon2Cache
|
|
14
|
+
};
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* 비밀번호 검증 및 강도 측정 모듈 (프레임워크 독립적)
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import type { PasswordConfig } from '@withwiz/core/auth/types';
|
|
8
|
-
import { PasswordStrength, type PasswordValidationResult as BasePasswordValidationResult } from '@withwiz/core/auth/types';
|
|
7
|
+
import type { PasswordConfig } from '@withwiz/toolkit/core/auth/types';
|
|
8
|
+
import { PasswordStrength, type PasswordValidationResult as BasePasswordValidationResult } from '@withwiz/toolkit/core/auth/types';
|
|
9
9
|
export interface PasswordValidationResult extends BasePasswordValidationResult {
|
|
10
10
|
score: number;
|
|
11
11
|
}
|
|
@@ -32,7 +32,7 @@ export declare class PasswordValidator {
|
|
|
32
32
|
/**
|
|
33
33
|
* Zod 스키마 생성
|
|
34
34
|
*/
|
|
35
|
-
createZodSchema(): z.
|
|
35
|
+
createZodSchema(): z.ZodType<string>;
|
|
36
36
|
/**
|
|
37
37
|
* 비밀번호 힌트 생성
|
|
38
38
|
*/
|
|
@@ -62,10 +62,12 @@ export declare class PasswordHasher {
|
|
|
62
62
|
* 기본 비밀번호 스키마 (기존 코드 호환성)
|
|
63
63
|
* 최소 8자, 숫자 포함
|
|
64
64
|
*/
|
|
65
|
-
export declare const defaultPasswordSchema: z.ZodString
|
|
65
|
+
export declare const defaultPasswordSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
66
66
|
/**
|
|
67
67
|
* 강력한 비밀번호 스키마 (기존 코드 호환성)
|
|
68
68
|
* 최소 12자, 대소문자, 숫자, 특수문자 포함
|
|
69
69
|
*/
|
|
70
|
-
export declare const strongPasswordSchema: z.ZodString
|
|
71
|
-
export
|
|
70
|
+
export declare const strongPasswordSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
71
|
+
export { BcryptPasswordHasher, Argon2idPasswordHasher, MigratingPasswordHasher, } from '@withwiz/toolkit/core/auth/password/hasher';
|
|
72
|
+
export type { IPasswordHasher, BcryptHasherOptions, Argon2idHasherOptions, MigratingHasherOptions, } from '@withwiz/toolkit/core/auth/password/hasher';
|
|
73
|
+
export type { PasswordConfig, PasswordStrength } from '@withwiz/toolkit/core/auth/types';
|
|
@@ -3,10 +3,19 @@ import {
|
|
|
3
3
|
PasswordValidator,
|
|
4
4
|
defaultPasswordSchema,
|
|
5
5
|
strongPasswordSchema
|
|
6
|
-
} from "../../../chunk-
|
|
6
|
+
} from "../../../chunk-4ROIPF33.js";
|
|
7
|
+
import {
|
|
8
|
+
Argon2idPasswordHasher,
|
|
9
|
+
BcryptPasswordHasher,
|
|
10
|
+
MigratingPasswordHasher
|
|
11
|
+
} from "../../../chunk-ILMPKSWS.js";
|
|
7
12
|
import "../../../chunk-GH3U4WRE.js";
|
|
8
|
-
import "../../../chunk-
|
|
13
|
+
import "../../../chunk-5GWGARXI.js";
|
|
14
|
+
import "../../../chunk-N3ETBM74.js";
|
|
9
15
|
export {
|
|
16
|
+
Argon2idPasswordHasher,
|
|
17
|
+
BcryptPasswordHasher,
|
|
18
|
+
MigratingPasswordHasher,
|
|
10
19
|
PasswordHasher,
|
|
11
20
|
PasswordValidator,
|
|
12
21
|
defaultPasswordSchema,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UserRepository, EmailTokenRepository, EmailSender, Logger } from '
|
|
1
|
+
import type { UserRepository, EmailTokenRepository, EmailSender, Logger } from '@withwiz/toolkit/core/auth/types';
|
|
2
2
|
export interface EmailVerificationServiceConfig {
|
|
3
3
|
userRepository: UserRepository;
|
|
4
4
|
emailTokenRepository: EmailTokenRepository;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EmailVerificationService
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-VWKZMGPJ.js";
|
|
4
|
+
import "../../../chunk-ZZABL54F.js";
|
|
5
5
|
import "../../../chunk-GH3U4WRE.js";
|
|
6
6
|
import "../../../chunk-5GWGARXI.js";
|
|
7
|
-
import "../../../chunk-
|
|
7
|
+
import "../../../chunk-N3ETBM74.js";
|
|
8
8
|
export {
|
|
9
9
|
EmailVerificationService
|
|
10
10
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export { LoginService } from '
|
|
2
|
-
export type { LoginServiceConfig, LoginResult } from '
|
|
3
|
-
export { RegisterService } from '
|
|
4
|
-
export type { RegisterServiceConfig, RegisterInput, RegisterResult } from '
|
|
5
|
-
export { OAuthCallbackService } from '
|
|
6
|
-
export type { OAuthCallbackServiceConfig, OAuthCallbackInput, OAuthCallbackResult } from '
|
|
7
|
-
export { TokenRefreshService } from '
|
|
8
|
-
export type { TokenRefreshServiceConfig, RefreshResult } from '
|
|
9
|
-
export {
|
|
10
|
-
export
|
|
11
|
-
export {
|
|
12
|
-
export
|
|
1
|
+
export { LoginService } from '@withwiz/toolkit/core/auth/services/login.service';
|
|
2
|
+
export type { LoginServiceConfig, LoginResult } from '@withwiz/toolkit/core/auth/services/login.service';
|
|
3
|
+
export { RegisterService } from '@withwiz/toolkit/core/auth/services/register.service';
|
|
4
|
+
export type { RegisterServiceConfig, RegisterInput, RegisterResult } from '@withwiz/toolkit/core/auth/services/register.service';
|
|
5
|
+
export { OAuthCallbackService } from '@withwiz/toolkit/core/auth/services/oauth-callback.service';
|
|
6
|
+
export type { OAuthCallbackServiceConfig, OAuthCallbackInput, OAuthCallbackResult } from '@withwiz/toolkit/core/auth/services/oauth-callback.service';
|
|
7
|
+
export { TokenRefreshService } from '@withwiz/toolkit/core/auth/services/token-refresh.service';
|
|
8
|
+
export type { TokenRefreshServiceConfig, RefreshResult } from '@withwiz/toolkit/core/auth/services/token-refresh.service';
|
|
9
|
+
export type { IRefreshTokenStore, RefreshTokenRecord } from '@withwiz/toolkit/core/auth/services/refresh-token-store';
|
|
10
|
+
export { PasswordResetService } from '@withwiz/toolkit/core/auth/services/password-reset.service';
|
|
11
|
+
export type { PasswordResetServiceConfig } from '@withwiz/toolkit/core/auth/services/password-reset.service';
|
|
12
|
+
export { EmailVerificationService } from '@withwiz/toolkit/core/auth/services/email-verification.service';
|
|
13
|
+
export type { EmailVerificationServiceConfig } from '@withwiz/toolkit/core/auth/services/email-verification.service';
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoginService
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import {
|
|
5
|
-
RegisterService
|
|
6
|
-
} from "../../../chunk-LUIYCIF7.js";
|
|
3
|
+
} from "../../../chunk-TNDEYJEL.js";
|
|
7
4
|
import {
|
|
8
5
|
EmailVerificationService
|
|
9
|
-
} from "../../../chunk-
|
|
10
|
-
import {
|
|
11
|
-
PasswordResetService
|
|
12
|
-
} from "../../../chunk-N5VOFGF3.js";
|
|
6
|
+
} from "../../../chunk-VWKZMGPJ.js";
|
|
13
7
|
import {
|
|
14
8
|
OAuthCallbackService
|
|
15
|
-
} from "../../../chunk-
|
|
9
|
+
} from "../../../chunk-MTZXWVW3.js";
|
|
16
10
|
import {
|
|
17
11
|
TokenRefreshService
|
|
18
|
-
} from "../../../chunk-
|
|
19
|
-
import
|
|
12
|
+
} from "../../../chunk-XAGPZLRK.js";
|
|
13
|
+
import {
|
|
14
|
+
RegisterService
|
|
15
|
+
} from "../../../chunk-Y4ME3Q5K.js";
|
|
16
|
+
import {
|
|
17
|
+
PasswordResetService
|
|
18
|
+
} from "../../../chunk-75UDFONR.js";
|
|
19
|
+
import "../../../chunk-LWHLB2Y6.js";
|
|
20
|
+
import "../../../chunk-ZZABL54F.js";
|
|
20
21
|
import "../../../chunk-GH3U4WRE.js";
|
|
21
|
-
import "../../../chunk-2PFSRVVD.js";
|
|
22
|
-
import "../../../chunk-2JGSS4RM.js";
|
|
23
22
|
import "../../../chunk-5GWGARXI.js";
|
|
24
|
-
import "../../../chunk-
|
|
23
|
+
import "../../../chunk-PRPMEHRE.js";
|
|
24
|
+
import "../../../chunk-N3TCQ5BF.js";
|
|
25
|
+
import "../../../chunk-7YWUKMZD.js";
|
|
25
26
|
import "../../../chunk-6J2EJVND.js";
|
|
26
27
|
import "../../../chunk-F3R3UYBF.js";
|
|
27
|
-
import "../../../chunk-
|
|
28
|
-
import "../../../chunk-ORMEWXMH.js";
|
|
28
|
+
import "../../../chunk-N3ETBM74.js";
|
|
29
29
|
export {
|
|
30
30
|
EmailVerificationService,
|
|
31
31
|
LoginService,
|
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
import type { UserRepository, BaseUser, TokenPair, Logger } from '
|
|
1
|
+
import type { UserRepository, BaseUser, TokenPair, Logger } from '@withwiz/toolkit/core/auth/types';
|
|
2
|
+
import type { IPasswordHasher } from '@withwiz/toolkit/core/auth/password/hasher';
|
|
2
3
|
export interface LoginServiceConfig {
|
|
3
4
|
userRepository: UserRepository;
|
|
4
5
|
jwtSecret: string;
|
|
5
6
|
accessTokenExpiry?: string;
|
|
6
7
|
refreshTokenExpiry?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 비밀번호 검증/재해시에 사용할 pluggable 해셔.
|
|
10
|
+
* 미지정 시 bcryptjs.compare 로 폴백한다 (하위 호환).
|
|
11
|
+
* `MigratingPasswordHasher` 를 주입하면 레거시 해시(scrypt 등)를 검증하고
|
|
12
|
+
* needsRehash 시 LoginResult.rehashedPassword 로 신규 해시를 반환한다.
|
|
13
|
+
*/
|
|
14
|
+
passwordHasher?: IPasswordHasher;
|
|
7
15
|
logger?: Logger;
|
|
8
16
|
}
|
|
9
17
|
export interface LoginResult {
|
|
10
18
|
user: BaseUser;
|
|
11
19
|
tokens: TokenPair;
|
|
20
|
+
/**
|
|
21
|
+
* storedHash 가 재해시 대상일 때(rehash-on-login)에만 채워진다.
|
|
22
|
+
* 소비자는 이 값을 사용자 레코드에 저장해 무중단 해시 마이그레이션을 수행한다.
|
|
23
|
+
*/
|
|
24
|
+
rehashedPassword?: string;
|
|
12
25
|
}
|
|
13
26
|
export declare class LoginService {
|
|
14
27
|
private jwtService;
|
|
15
28
|
private userRepo;
|
|
29
|
+
private passwordHasher?;
|
|
16
30
|
private logger;
|
|
17
31
|
constructor(config: LoginServiceConfig);
|
|
18
32
|
login(email: string, password: string, storedHash: string): Promise<LoginResult>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoginService
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
5
|
-
import "../../../chunk-2JGSS4RM.js";
|
|
3
|
+
} from "../../../chunk-TNDEYJEL.js";
|
|
4
|
+
import "../../../chunk-LWHLB2Y6.js";
|
|
6
5
|
import "../../../chunk-5GWGARXI.js";
|
|
7
|
-
import "../../../chunk-
|
|
6
|
+
import "../../../chunk-PRPMEHRE.js";
|
|
7
|
+
import "../../../chunk-N3TCQ5BF.js";
|
|
8
|
+
import "../../../chunk-7YWUKMZD.js";
|
|
8
9
|
import "../../../chunk-6J2EJVND.js";
|
|
9
10
|
import "../../../chunk-F3R3UYBF.js";
|
|
10
|
-
import "../../../chunk-
|
|
11
|
-
import "../../../chunk-ORMEWXMH.js";
|
|
11
|
+
import "../../../chunk-N3ETBM74.js";
|
|
12
12
|
export {
|
|
13
13
|
LoginService
|
|
14
14
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UserRepository, OAuthAccountRepository, BaseUser, TokenPair, Logger } from '
|
|
1
|
+
import type { UserRepository, OAuthAccountRepository, BaseUser, TokenPair, Logger } from '@withwiz/toolkit/core/auth/types';
|
|
2
2
|
export interface OAuthCallbackServiceConfig {
|
|
3
3
|
userRepository: UserRepository;
|
|
4
4
|
oauthAccountRepository: OAuthAccountRepository;
|
|
@@ -15,6 +15,12 @@ export interface OAuthCallbackInput {
|
|
|
15
15
|
image: string | null;
|
|
16
16
|
accessToken: string;
|
|
17
17
|
refreshToken?: string;
|
|
18
|
+
/**
|
|
19
|
+
* provider 가 이 이메일을 검증했는지 여부. 기존 로컬 계정에 OAuth 를
|
|
20
|
+
* 연결할 때 반드시 true 여야 한다(미검증/부재 시 계정 탈취 방지를 위해 차단).
|
|
21
|
+
* OAuthUserInfo.emailVerified 를 그대로 전달할 것.
|
|
22
|
+
*/
|
|
23
|
+
emailVerified?: boolean;
|
|
18
24
|
}
|
|
19
25
|
export interface OAuthCallbackResult {
|
|
20
26
|
user: BaseUser;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OAuthCallbackService
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
5
|
-
import "../../../chunk-2JGSS4RM.js";
|
|
3
|
+
} from "../../../chunk-MTZXWVW3.js";
|
|
4
|
+
import "../../../chunk-LWHLB2Y6.js";
|
|
6
5
|
import "../../../chunk-5GWGARXI.js";
|
|
7
|
-
import "../../../chunk-
|
|
6
|
+
import "../../../chunk-PRPMEHRE.js";
|
|
7
|
+
import "../../../chunk-N3TCQ5BF.js";
|
|
8
|
+
import "../../../chunk-7YWUKMZD.js";
|
|
8
9
|
import "../../../chunk-6J2EJVND.js";
|
|
9
10
|
import "../../../chunk-F3R3UYBF.js";
|
|
10
|
-
import "../../../chunk-
|
|
11
|
-
import "../../../chunk-ORMEWXMH.js";
|
|
11
|
+
import "../../../chunk-N3ETBM74.js";
|
|
12
12
|
export {
|
|
13
13
|
OAuthCallbackService
|
|
14
14
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UserRepository, EmailTokenRepository, EmailSender, Logger } from '
|
|
1
|
+
import type { UserRepository, EmailTokenRepository, EmailSender, Logger } from '@withwiz/toolkit/core/auth/types';
|
|
2
2
|
export interface PasswordResetServiceConfig {
|
|
3
3
|
userRepository: UserRepository;
|
|
4
4
|
emailTokenRepository: EmailTokenRepository;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PasswordResetService
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-75UDFONR.js";
|
|
4
|
+
import "../../../chunk-ZZABL54F.js";
|
|
5
5
|
import "../../../chunk-GH3U4WRE.js";
|
|
6
6
|
import "../../../chunk-5GWGARXI.js";
|
|
7
|
-
import "../../../chunk-
|
|
7
|
+
import "../../../chunk-N3ETBM74.js";
|
|
8
8
|
export {
|
|
9
9
|
PasswordResetService
|
|
10
10
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Refresh Token Store (rotation + reuse detection)
|
|
3
|
+
*
|
|
4
|
+
* stateful refresh 토큰 추적 추상화. 구현은 소비자 몫(Redis/DB/메모리).
|
|
5
|
+
*
|
|
6
|
+
* 모델:
|
|
7
|
+
* - 각 refresh 토큰은 고유 `jti` 를 가지며 회전 계보(`familyId`)에 속한다.
|
|
8
|
+
* - 로그인 시 새 family 가 생성되고, 회전할 때마다 같은 family 안에서 새 jti 가
|
|
9
|
+
* 발급되며 구 jti 는 used 로 표시된다.
|
|
10
|
+
* - 이미 used 인 jti 가 다시 제출되면(=회전된 토큰 재사용) 탈취로 간주하고
|
|
11
|
+
* family 전체를 무효화한다(reuse detection).
|
|
12
|
+
* - 로그아웃은 family 무효화로 즉시 stateful 무효화를 제공한다.
|
|
13
|
+
*
|
|
14
|
+
* reuse detection 에 필수인 것은 `isUsed`/`markUsed`/`isFamilyRevoked`/
|
|
15
|
+
* `revokeFamily` 네 개다. `register` 는 TTL·감사 목적의 선택적 훅이다.
|
|
16
|
+
*/
|
|
17
|
+
export interface RefreshTokenRecord {
|
|
18
|
+
jti: string;
|
|
19
|
+
familyId: string;
|
|
20
|
+
userId: string;
|
|
21
|
+
/** 토큰 만료 시각 — store TTL 설정에 사용 가능. */
|
|
22
|
+
expiresAt?: Date;
|
|
23
|
+
}
|
|
24
|
+
export interface IRefreshTokenStore {
|
|
25
|
+
/** 이 jti 가 이미 회전(소비)되었는지 여부. */
|
|
26
|
+
isUsed(jti: string): Promise<boolean>;
|
|
27
|
+
/** 회전 시 구 jti 를 소비 처리한다. meta 로 TTL/계보 정보를 함께 줄 수 있다. */
|
|
28
|
+
markUsed(jti: string, meta?: {
|
|
29
|
+
familyId: string;
|
|
30
|
+
userId: string;
|
|
31
|
+
expiresAt?: Date;
|
|
32
|
+
}): Promise<void>;
|
|
33
|
+
/** family 전체가 무효화되었는지 여부. */
|
|
34
|
+
isFamilyRevoked(familyId: string): Promise<boolean>;
|
|
35
|
+
/** family 전체 무효화 (reuse 탐지 / 로그아웃). */
|
|
36
|
+
revokeFamily(familyId: string): Promise<void>;
|
|
37
|
+
/** (선택) 새 refresh 발급 기록 — store TTL/감사용. */
|
|
38
|
+
register?(record: RefreshTokenRecord): Promise<void>;
|
|
39
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UserRepository, EmailTokenRepository, EmailSender, BaseUser, Logger } from '
|
|
1
|
+
import type { UserRepository, EmailTokenRepository, EmailSender, BaseUser, Logger } from '@withwiz/toolkit/core/auth/types';
|
|
2
2
|
export interface RegisterServiceConfig {
|
|
3
3
|
userRepository: UserRepository;
|
|
4
4
|
emailTokenRepository: EmailTokenRepository;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RegisterService
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-Y4ME3Q5K.js";
|
|
4
|
+
import "../../../chunk-ZZABL54F.js";
|
|
5
5
|
import "../../../chunk-GH3U4WRE.js";
|
|
6
6
|
import "../../../chunk-5GWGARXI.js";
|
|
7
|
-
import "../../../chunk-
|
|
7
|
+
import "../../../chunk-N3ETBM74.js";
|
|
8
8
|
export {
|
|
9
9
|
RegisterService
|
|
10
10
|
};
|
|
@@ -1,14 +1,29 @@
|
|
|
1
|
-
import type { UserRepository, Logger } from '
|
|
1
|
+
import type { UserRepository, Logger } from '@withwiz/toolkit/core/auth/types';
|
|
2
|
+
import type { IRefreshTokenStore } from '@withwiz/toolkit/core/auth/services/refresh-token-store';
|
|
2
3
|
export interface TokenRefreshServiceConfig {
|
|
3
4
|
userRepository: UserRepository;
|
|
4
5
|
jwtSecret: string;
|
|
5
6
|
accessTokenExpiry?: string;
|
|
6
7
|
refreshTokenExpiry?: string;
|
|
7
8
|
isTokenBlacklisted?: (token: string) => Promise<boolean>;
|
|
9
|
+
/**
|
|
10
|
+
* 주입 시 refresh 토큰 회전(rotation) + 재사용 탐지(reuse detection)를 활성화한다.
|
|
11
|
+
* - 회전: refresh 마다 새 refresh 를 발급하고 구 jti 를 used 로 표시한다.
|
|
12
|
+
* - 재사용 탐지: 이미 used 인 jti 재제출 → family 전체 무효화(탈취 대응).
|
|
13
|
+
* 미주입 시 0.8 이전과 동일하게 access 토큰만 재발급한다(하위 호환).
|
|
14
|
+
*
|
|
15
|
+
* 주의: 동시 요청 경쟁을 막으려면 store 의 isUsed→markUsed 는 원자적이어야 한다.
|
|
16
|
+
*/
|
|
17
|
+
refreshTokenStore?: IRefreshTokenStore;
|
|
8
18
|
logger?: Logger;
|
|
9
19
|
}
|
|
10
20
|
export interface RefreshResult {
|
|
11
21
|
accessToken: string;
|
|
22
|
+
/**
|
|
23
|
+
* 회전이 일어난 경우(store 주입 시)에만 채워진다. 소비자는 이 값으로 기존
|
|
24
|
+
* refresh 토큰(쿠키 등)을 교체해야 한다.
|
|
25
|
+
*/
|
|
26
|
+
refreshToken?: string;
|
|
12
27
|
user: {
|
|
13
28
|
id: string;
|
|
14
29
|
email: string;
|
|
@@ -19,7 +34,18 @@ export declare class TokenRefreshService {
|
|
|
19
34
|
private userRepo;
|
|
20
35
|
private jwtService;
|
|
21
36
|
private isTokenBlacklisted?;
|
|
37
|
+
private store?;
|
|
22
38
|
private logger;
|
|
23
39
|
constructor(config: TokenRefreshServiceConfig);
|
|
24
40
|
refresh(refreshToken: string): Promise<RefreshResult>;
|
|
41
|
+
/**
|
|
42
|
+
* family 전체를 즉시 무효화한다 (stateful 로그아웃 / 탈취 대응).
|
|
43
|
+
* store 미주입 시 동작하지 않는다.
|
|
44
|
+
*/
|
|
45
|
+
revokeFamily(familyId: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* refresh 토큰을 검증해 그 family 를 무효화한다 (로그아웃 핸들러용).
|
|
48
|
+
* 토큰에 familyId 가 없으면(레거시) 무효화할 family 가 없으므로 무시한다.
|
|
49
|
+
*/
|
|
50
|
+
revokeByToken(refreshToken: string): Promise<void>;
|
|
25
51
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TokenRefreshService
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
5
|
-
import "../../../chunk-2JGSS4RM.js";
|
|
3
|
+
} from "../../../chunk-XAGPZLRK.js";
|
|
4
|
+
import "../../../chunk-LWHLB2Y6.js";
|
|
6
5
|
import "../../../chunk-5GWGARXI.js";
|
|
7
|
-
import "../../../chunk-
|
|
6
|
+
import "../../../chunk-PRPMEHRE.js";
|
|
7
|
+
import "../../../chunk-N3TCQ5BF.js";
|
|
8
|
+
import "../../../chunk-7YWUKMZD.js";
|
|
8
9
|
import "../../../chunk-6J2EJVND.js";
|
|
9
10
|
import "../../../chunk-F3R3UYBF.js";
|
|
10
|
-
import "../../../chunk-
|
|
11
|
-
import "../../../chunk-ORMEWXMH.js";
|
|
11
|
+
import "../../../chunk-N3ETBM74.js";
|
|
12
12
|
export {
|
|
13
13
|
TokenRefreshService
|
|
14
14
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 토큰 전달 전략 — tokenDelivery 모드(cookie/header/hybrid)별 구현체.
|
|
3
|
+
*
|
|
4
|
+
* 분기 대신 주입: 미들웨어·핸들러는 모드 문자열을 직접 비교하지 않고
|
|
5
|
+
* getTokenDeliveryStrategy() 가 돌려주는 구현체의 메서드를 호출한다.
|
|
6
|
+
* oauth-callback 은 redirect 응답 특성상 전략 비적용(항상 쿠키).
|
|
7
|
+
*/
|
|
8
|
+
import type { TokenDelivery } from '@withwiz/toolkit/core/auth/config';
|
|
9
|
+
import type { TokenPair } from '@withwiz/toolkit/core/auth/types';
|
|
10
|
+
import type { CookieOptions } from '@withwiz/toolkit/core/auth/jwt/cookie';
|
|
11
|
+
/** cookies/headers/json 만 구조적으로 요구 — NextRequest 미의존 (core 티어 규칙) */
|
|
12
|
+
export interface TokenSource {
|
|
13
|
+
cookies: {
|
|
14
|
+
get(name: string): {
|
|
15
|
+
value: string;
|
|
16
|
+
} | undefined;
|
|
17
|
+
};
|
|
18
|
+
headers: {
|
|
19
|
+
get(name: string): string | null;
|
|
20
|
+
};
|
|
21
|
+
json?(): Promise<unknown>;
|
|
22
|
+
}
|
|
23
|
+
/** setTokenCookies 가 요구하는 최소 Response 형태 */
|
|
24
|
+
interface CookieSettableResponse {
|
|
25
|
+
cookies: {
|
|
26
|
+
set(name: string, value: string, options?: Record<string, unknown>): void;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface TokenDeliveryStrategy {
|
|
30
|
+
/** access token 추출. Authorization 헤더 파싱은 호출측 JWT 구현에 위임 */
|
|
31
|
+
extractAccessToken(source: TokenSource, parseHeader: (header: string | null) => string | null): string | null;
|
|
32
|
+
/** refresh token 추출 (header/hybrid 는 body { refreshToken } 허용) */
|
|
33
|
+
extractRefreshToken(source: TokenSource): Promise<string | undefined>;
|
|
34
|
+
/** 응답 body 에 토큰 조각 포함 여부 결정 — cookie 모드는 body 그대로 */
|
|
35
|
+
buildTokenResponse(body: Record<string, unknown>, fragment: Record<string, unknown>): Record<string, unknown>;
|
|
36
|
+
/** 토큰 쿠키 설정 — header 모드는 no-op */
|
|
37
|
+
attachCookies<T extends CookieSettableResponse>(response: T, tokens: TokenPair, options?: CookieOptions): T;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* tokenDelivery 모드 해석.
|
|
41
|
+
* 우선순위: 옵션 > 전역 AuthConfig > 'hybrid'
|
|
42
|
+
* 요청 시점에 호출할 것 — 핸들러 팩토리는 initialize() 이전에 실행될 수 있다.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveTokenDelivery(optionValue?: TokenDelivery): TokenDelivery;
|
|
45
|
+
/** 해석된 모드의 전략 구현체 반환 */
|
|
46
|
+
export declare function getTokenDeliveryStrategy(optionValue?: TokenDelivery): TokenDeliveryStrategy;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getTokenDeliveryStrategy,
|
|
3
|
+
resolveTokenDelivery
|
|
4
|
+
} from "../../chunk-63EKUOJH.js";
|
|
5
|
+
import "../../chunk-PRPMEHRE.js";
|
|
6
|
+
import "../../chunk-N3TCQ5BF.js";
|
|
7
|
+
import "../../chunk-7YWUKMZD.js";
|
|
8
|
+
import "../../chunk-6J2EJVND.js";
|
|
9
|
+
import "../../chunk-F3R3UYBF.js";
|
|
10
|
+
import "../../chunk-N3ETBM74.js";
|
|
11
|
+
export {
|
|
12
|
+
getTokenDeliveryStrategy,
|
|
13
|
+
resolveTokenDelivery
|
|
14
|
+
};
|
|
@@ -10,11 +10,22 @@ export interface Logger {
|
|
|
10
10
|
warn(message: string, meta?: any): void;
|
|
11
11
|
error(message: string, meta?: any): void;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* JWT 페이로드.
|
|
15
|
+
*
|
|
16
|
+
* `role`은 평범한 `string`이며 toolkit은 고정 role enum을 소유하지 않는다.
|
|
17
|
+
* 소비자가 자체 역할 어휘(union/enum)를 가지면 타입 인자로 좁힐 수 있다.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* type AppRole = 'USER' | 'EDITOR' | 'ADMIN';
|
|
21
|
+
* const payload = await jwt.verifyAccessToken<AppRole>(token);
|
|
22
|
+
* payload.role; // 'USER' | 'EDITOR' | 'ADMIN'
|
|
23
|
+
*/
|
|
24
|
+
export interface JWTPayload<TRole extends string = string> {
|
|
14
25
|
id: string;
|
|
15
26
|
userId: string;
|
|
16
27
|
email: string;
|
|
17
|
-
role:
|
|
28
|
+
role: TRole;
|
|
18
29
|
emailVerified?: Date | null;
|
|
19
30
|
tokenType?: 'access' | 'refresh';
|
|
20
31
|
iat?: number;
|
|
@@ -24,11 +35,34 @@ export interface TokenPair {
|
|
|
24
35
|
accessToken: string;
|
|
25
36
|
refreshToken: string;
|
|
26
37
|
}
|
|
38
|
+
/** 대칭 HMAC 알고리즘 — 단일 secret 으로 발급·검증. */
|
|
39
|
+
export type SymmetricJWTAlgorithm = 'HS256' | 'HS384' | 'HS512';
|
|
40
|
+
/** 비대칭 알고리즘 — privateKey 로 발급, publicKey/JWKS 로 검증. */
|
|
41
|
+
export type AsymmetricJWTAlgorithm = 'RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'EdDSA';
|
|
42
|
+
export type JWTAlgorithm = SymmetricJWTAlgorithm | AsymmetricJWTAlgorithm;
|
|
43
|
+
/**
|
|
44
|
+
* JWT 설정.
|
|
45
|
+
*
|
|
46
|
+
* - HS 계열(대칭): `secret`(>= 32자) 필수. 발급·검증 동일 키.
|
|
47
|
+
* - RS·ES·EdDSA 계열(비대칭): 발급에는 `privateKey`(PEM PKCS#8), 검증에는
|
|
48
|
+
* `publicKey`(PEM SPKI) 또는 `jwksUri`(원격 JWKS) 필요. 발급/검증을 분리한
|
|
49
|
+
* 서비스에서는 한쪽만 설정한다(검증 전용 서비스는 privateKey 생략).
|
|
50
|
+
*
|
|
51
|
+
* 보안: 검증 시 알고리즘 allowlist 를 `algorithm` 한 개로 고정해 alg confusion
|
|
52
|
+
* (예: RS256 토큰을 HS256 으로 검증시켜 공개키를 HMAC 비밀로 악용)을 차단한다.
|
|
53
|
+
*/
|
|
27
54
|
export interface JWTConfig {
|
|
28
|
-
|
|
55
|
+
algorithm: JWTAlgorithm;
|
|
29
56
|
accessTokenExpiry: string;
|
|
30
57
|
refreshTokenExpiry: string;
|
|
31
|
-
|
|
58
|
+
/** HS* 대칭키 (>= 32자). */
|
|
59
|
+
secret?: string;
|
|
60
|
+
/** 비대칭 발급용 개인키 (PEM PKCS#8). */
|
|
61
|
+
privateKey?: string;
|
|
62
|
+
/** 비대칭 검증용 공개키 (PEM SPKI). `jwksUri` 와 택일. */
|
|
63
|
+
publicKey?: string;
|
|
64
|
+
/** 비대칭 검증용 원격 JWKS endpoint. `publicKey` 와 택일. */
|
|
65
|
+
jwksUri?: string;
|
|
32
66
|
}
|
|
33
67
|
export declare const OAUTH_PROVIDERS: {
|
|
34
68
|
readonly GOOGLE: "google";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getCacheConfig,
|
|
3
3
|
getCacheTTL
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-Y6CPPBJI.js";
|
|
5
|
+
import "../../chunk-HV6A6Z5R.js";
|
|
6
6
|
import "../../chunk-PX535BHW.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-ERFD6YAW.js";
|
|
7
|
+
import "../../chunk-7KIM5MHV.js";
|
|
9
8
|
import "../../chunk-6J2EJVND.js";
|
|
10
9
|
import "../../chunk-F3R3UYBF.js";
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-ERFD6YAW.js";
|
|
11
|
+
import "../../chunk-N3ETBM74.js";
|
|
12
12
|
export {
|
|
13
13
|
getCacheConfig,
|
|
14
14
|
getCacheTTL
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* - getResolvedCacheConfig()에서 설정을 읽어 ISharedEnvConfig 호환 레이어 제공
|
|
6
6
|
* - process.env 의존성 없음
|
|
7
7
|
*/
|
|
8
|
-
import type { ISharedEnvConfig, IRawEnv } from '@withwiz/core/types/env';
|
|
8
|
+
import type { ISharedEnvConfig, IRawEnv } from '@withwiz/toolkit/core/types/env';
|
|
9
9
|
/**
|
|
10
10
|
* 현재 캐시 설정을 ISharedEnvConfig 형태로 반환 (하위 호환 레이어)
|
|
11
11
|
*/
|
|
12
12
|
export declare function getConfig(): ISharedEnvConfig;
|
|
13
13
|
export declare const getEnv: () => IRawEnv;
|
|
14
14
|
export declare const getENV: () => {
|
|
15
|
-
REDIS: import("@withwiz/core/types/env").IRedisEnv;
|
|
16
|
-
CACHE: import("@withwiz/core/types/env").ICacheEnv;
|
|
15
|
+
REDIS: import("@withwiz/toolkit/core/types/env").IRedisEnv;
|
|
16
|
+
CACHE: import("@withwiz/toolkit/core/types/env").ICacheEnv;
|
|
17
17
|
};
|
|
18
18
|
export declare const isCacheEnabled: () => boolean;
|
|
19
19
|
export declare function validateRedisEnvironment(): {
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
getEnv,
|
|
7
7
|
isCacheEnabled,
|
|
8
8
|
validateRedisEnvironment
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-HV6A6Z5R.js";
|
|
10
10
|
import "../../chunk-PX535BHW.js";
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-ERFD6YAW.js";
|
|
11
|
+
import "../../chunk-7KIM5MHV.js";
|
|
13
12
|
import "../../chunk-6J2EJVND.js";
|
|
14
13
|
import "../../chunk-F3R3UYBF.js";
|
|
15
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-ERFD6YAW.js";
|
|
15
|
+
import "../../chunk-N3ETBM74.js";
|
|
16
16
|
export {
|
|
17
17
|
getCacheFallbackConfig,
|
|
18
18
|
getCacheHealthConfig,
|