v2.0.0
What's Changed
- Prep CharonOauth2 integration by @juulSme in #14
- session stores take a
typeargument to separate sessions into full (legacy name meaning first-party) and oauth2 sessions, so that adelete_allcall will not log out oauth2 sessions, for example - sessions now contain their full expiration info to simplify implementing session stores
TokenFactory.SymmetricJwtis renamed to simplyTokenFactory.Jwt, because...- JWT factory now supports asymmetric Ed25519/Ed448 signatures
- JWT factory supports key rotation using keysets and
kidclaims - JWT factory relies on
kidclaim in Jwt header to determine signing key, instead of "guessing" it using thealgclaim - JWT factory config has been simplified
Confignow has:get_base_secretwhich is used to derive keys for other purposes using PBKDF2 (which can also be used by child packages)Confignow has:json_module(which can also be used by child packages)Utils.Keygeneratorcan be used to derive keys using PBKDF2, and caches the keys using FastGlobal. It assumes that the number of derived keys is limited, because FastGlobal is very fast for reads but increasingly slow for writes.TokenPlug.PutAssignssupports assigning any token claim to the connSessionPlugssupport:session_typeoption, the value of which is added as token claimstypSessionPlugsmakes sure that a session's:refresh_expires_atnever outlives:expires_at, meaning that session stores can rely on this value for garbage collectionTokenPlugsaddsverify_token_payload/2,verify_session_payload/2TokenPlugs.verify_refresh_token_freshnow determines freshness based on "refresh generations" (read the docstring for full explanation)Utilshas additional setters
- session stores take a
Full Changelog: v1.3.4...v2.0.0