Changes for version 0.09 - 2026-11-28
- FIX: a form-encoded POST to /authorize was answered 400 "missing client_id"; only the query string was read. POST now reads the body and the query string, and a parameter sent twice, or in both with different values, is a 400 (it used to reach the store as "ARRAY(0x...)").
- FIX: with `csrf` declared after oauth2_server, /token, /revoke, /introspect and /register answered 403 to every client; with it declared first, exempting them reset the application's own csrf settings. Exemptions are now added to the app's list at to_app, in any order.
- FIX (docs): the Store POD's example store dropped grant_types, so its clients could do nothing; the schema POD lacked the claims columns; two VERSION sections still said 0.05.
- FIX: at the cap of three concurrent logins, the flow dropped among those begun in the same second was arbitrary. It is the first begun now.
- Requires Fetch 0.28: before it, a process holding a kept-alive connection could crash as it exited.
- OpenID Provider: id_tokens for the `openid` scope, GET/POST /userinfo with a scope-filtered `userinfo` hook, and `oidc => 0` to switch both off. /introspect now reports only access tokens (typ at+jwt) as active.
- prompt (none, login, consent), max_age, auth_time and acr: the authenticate hook is called as ($c, \%request) and may return Punk::OAuth2::Server->authenticated($id, auth_time => ..., acr => ...). New option `max_age_leeway`.
- Pairwise subject identifiers (`pairwise_salt`, per-client subject_type and sector_identifier).
- RP-Initiated Logout: GET/POST /logout (end_session_endpoint) with a `logout` hook and per-client post_logout_redirect_uris.
- Device Authorization Grant (RFC 8628) with the `device` option: /device_authorization, the /device verification page, and the device_code grant at /token. User-code attempts are limited with Punk's $c->rate_hit; without an enforcing limiter the page refuses codes rather than allow unlimited guessing.
- Store: new client, code and device columns and the oauth2_devices table, added to an existing database at migrate; device_* methods.
Modules
OAuth2 and OpenID Connect for Punk applications
resource server bearer token checkers
a cached JWKS key set
provider presets for Punk::OAuth2
one configured OAuth2/OIDC provider
an OAuth2/OIDC authorization server
DBI storage for the authorization server
a token-endpoint response
shared helpers for Punk::OAuth2
social login for Punk applications