Commit Graph

6 Commits

Author SHA1 Message Date
Émile Ré
3b20f466c3 Fix indentation after errors.AsType refactor
Signed-off-by: Émile Ré <emile@probo.com>
2026-05-20 11:53:50 +04:00
Émile Ré
f5703d390b Enforce Go style rules across codebase
Apply five style rules: convert iota string enums to typed
string constants, replace errors.As with errors.AsType,
merge three-group imports into two groups, fix multiline
parameter/argument formatting, and replace fmt.Sprintf URL
construction with net/url.

Signed-off-by: Émile Ré <emile@probo.com>
2026-05-20 11:46:39 +04:00
Émile Ré
9156d6a16a Add wsl linter and fix
Signed-off-by: Émile Ré <emile@probo.com>
2026-05-20 09:27:28 +04:00
Sacha Al Himdani
9eed0d71c8 Log identity_id on every authenticated request
Add a single info log line in each authn middleware once an identity is
resolved, so every authenticated request emits a record that ties the
request back to its user and credential:

- Cookie session middleware logs "session authenticated" with
  identity_id and session_id.
- API key middleware logs "api key authenticated" with identity_id and
  api_key_id.
- OAuth2 access token middleware logs "access token authenticated"
  with identity_id and access_token_id.

The credential IDs are row identifiers (GIDs), not the secret token
values, so they're safe to log and let operators correlate a request
back to the specific credential used. The log lines use the
request-scoped logger from httpserver.LoggerFromContext so they
inherit http_request_id and any other middleware-attached attributes.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-05-13 15:49:52 +02:00
Sacha Al Himdani
8c02c53315 Update copyright headers across all Go files
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-25 17:38:32 +01:00
Émile Ré
1257347df9 Extract authn & authz utils
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:03 -08:00