mirror of
https://github.com/plausible/analytics.git
synced 2024-12-24 18:12:44 +03:00
373d4dd665
* Turn `Plausible.Auth.UserSession` into full schema * Implement token based sessions and use them as default * Ignore expired user sessions during retrieval from DB * Implement plug bumping user session last used and timeout timestamps * Implement Oban worker removing expired user sessions with grace period * Implement legacy session conversion on touch, when applicable * Update `UserAuth` moduledoc * Extend `UserAuth` tests to account for db-backed session tokens * Update CHANGELOG * Add tests for `UserSessionTouch` plug * Add test for `CleanUserSessions` worker * Add logging of legacy session retrievals * Use single update permitting stale records when touching user session * Don't fetch session and user for external API endpoints (/api/event too) * Refactor `Users.with_subscription/1` and expose helper query * Skip fetching session in legacy `SessionTimeoutPlug` * Rely on user session assign from `AuthContext` in `SentryContext` * Silence legacy session warnings in `UserSessionTouchTest` * Rely on session assign from `AuthPlug` in `SuperAdminOnlyPlug` * Change `UserAuth` to get session, user and last subscription in one go * Avoid refetching user session in `AuthorizeSiteAccess` plug * Fix code formatting * Refactor `UserAuth.get_user_token/1` (h/t @aerosol) * Remove bogus empty opts from `scope` declarations in router * Only touch session once an hour and keep `user.last_seen` in sync * Bring back logging of legacy token use |
||
---|---|---|
.. | ||
accept_traffic_until_notification.ex | ||
check_usage.ex | ||
clean_invitations.ex | ||
clean_user_sessions.ex | ||
clickhouse_clean_sites.ex | ||
expire_domain_change_transitions.ex | ||
export_analytics.ex | ||
import_analytics.ex | ||
local_import_analytics_cleaner.ex | ||
locations_sync.ex | ||
lock_sites.ex | ||
notify_annual_renewal.ex | ||
notify_exported_analytics.ex | ||
rotate_salts.ex | ||
schedule_email_reports.ex | ||
send_check_stats_emails.ex | ||
send_email_report.ex | ||
send_site_setup_emails.ex | ||
send_trial_notifications.ex | ||
traffic_change_notifier.ex |