Commit aa3c1bef authored by Luke Duncalfe's avatar Luke Duncalfe

Merge branch '354816-revert-changes' into 'master'

Revert changes from https://gitlab.com/gitlab-org/gitlab/-/merge_requests/82442

See merge request gitlab-org/gitlab!82849
parents 6cf43458 88ad6814
......@@ -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