bloom_auth_server 0.1.0
bloom_auth_server: ^0.1.0 copied to clipboard
Server-side authentication primitives for the Bloom framework, including password hashing, session/bearer token issuance, rate limiting, password reset workflows, and auth middleware.
0.1.0 #
- Initial release of
bloom_auth_server. - Password Hashing & Verification: Strong, constant-time BCrypt hashing (
hashPassword,verifyPassword,dummyVerifyPassword) with configurable cost factor and user-enumeration defense. - Session & Bearer Token Issuance: Cryptographically signed Bearer JWT issuance (
issueSessionToken,verifySessionToken) bound with expiration, user identity, and custom claims. - Sliding-Window Rate Limiting & Account Lockout: In-memory rate limiting (
InMemoryRateLimiter) and persistent-style lockout tracker (InMemoryLockoutManager,AuthRateLimiter) with fail-closed security semantics. - Password Reset Workflows: Single-purpose, time-limited, HMAC-signed password reset tokens (
generatePasswordResetToken,verifyPasswordResetToken) cryptographically bound to the user's current password hash to ensure instant invalidation upon password modification. - Bloom Server Middleware: Drop-in
BloomAuthMiddlewareforBloomApiRoutersupporting Bearer token extraction, claim hydration, role validation, andBloomRequestcontext extensions (request.auth,request.authUserId,request.isAuthenticated).