Commit 88ad6814 authored by Subashis's avatar Subashis

Revert changes about moving methods to base class

Changelog: other
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/82849
EE: true
parent a9f50d1a
......@@ -9,8 +9,6 @@ module Security
self.reactive_cache_refresh_interval = 1.minute
self.reactive_cache_lifetime = 10.minutes
self.reactive_cache_work_type = :external_dependency
self.reactive_cache_key = ->(finder) { finder.full_url }
self.reactive_cache_worker_finder = ->(id, *args) { from_cache(id) }
def initialize(project, provider, identifier_external_id)
@project = project
......
......@@ -3,6 +3,9 @@
module Security
module TrainingProviders
class KontraUrlFinder < BaseUrlFinder
self.reactive_cache_key = ->(finder) { finder.full_url }
self.reactive_cache_worker_finder = ->(id, *args) { from_cache(id) }
def calculate_reactive_cache(full_url)
bearer_token = "sbdMsxcgW2Xs75Q2uHc9FhUCZSEV3fSg" # To improve the authentication/integration https://gitlab.com/gitlab-org/gitlab/-/issues/354070
response = Gitlab::HTTP.try_get(
......
......@@ -3,6 +3,9 @@
module Security
module TrainingProviders
class SecureCodeWarriorUrlFinder < BaseUrlFinder
self.reactive_cache_key = ->(finder) { finder.full_url }
self.reactive_cache_worker_finder = ->(id, *args) { from_cache(id) }
def calculate_reactive_cache(full_url)
response = Gitlab::HTTP.try_get(full_url)
{ url: response.parsed_response["url"] } if response
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment