debian-mirror-gitlab/lib/gitlab/grape_logging/loggers/token_logger.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
362 B
Ruby
Raw Normal View History

2022-08-27 11:52:29 +05:30
# 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