debian-mirror-gitlab/lib/gitlab/grape_logging/loggers/token_logger.rb
2022-08-27 11:52:29 +05:30

17 lines
362 B
Ruby

# frozen_string_literal: true
module Gitlab
module GrapeLogging
module Loggers
class TokenLogger < ::GrapeLogging::Loggers::Base
def parameters(request, _)
params = request.env[::API::Helpers::API_TOKEN_ENV]
return {} unless params
params.slice(:token_type, :token_id)
end
end
end
end
end