module Doorkeeper::Models::Revocable

def revoke(clock = Time)

Parameters:
  • clock (Time) -- time object
def revoke(clock = Time)
  update_attribute(:revoked_at, clock.now.utc)
end

def revoked?

Returns:
  • (Boolean) - true if revoked, false in other case
def revoked?
  !!(revoked_at && revoked_at <= Time.now.utc)
end