class

Task::CleanOauth

Inherits Task::Singleton < Task < Ktistec::Model::Polymorphic < Ktistec::Model::Common < Ktistec::Model < Reference < Object

Cleans up OAuth data.

This task implements the following cleanup rules:

Expired Access Tokens:

  1. Delete access tokens where "expires_at < current_time"

Inactive Clients: Note: Manually created clients are always preserved.

  1. Delete clients created more than 1 month ago AND never accessed
  2. Delete clients that were last accessed more than one year ago

Constants

Log = ::Log.for(self)

Constructors

current_instance

Returns the current active instance of this singleton task.

Creates and saves a new instance if no active instance exists.

Source

Class methods

ensure_scheduled

Ensures the singleton task is scheduled.

Typically called on server startup to ensure singleton tasks are created and scheduled.

Source
find_active

Finds the active instance.

Returns nil if no active instance exists.

Source

Instance methods

perform
Source