mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Update calls to httpx loading the necessary auth plugin
This commit is contained in:
@@ -157,7 +157,7 @@ module Cron
|
||||
end
|
||||
|
||||
def introspection_request(host, api_token)
|
||||
OpenProject.httpx.basic_auth("apikey", api_token).get("https://#{host}/api/v3")
|
||||
OpenProject.httpx.plugin(:basic_auth).basic_auth("apikey", api_token).get("https://#{host}/api/v3")
|
||||
end
|
||||
|
||||
##
|
||||
@@ -188,7 +188,7 @@ module Cron
|
||||
ahead_by = data["ahead_by"].presence
|
||||
behind_by = data["behind_by"].presence
|
||||
|
||||
status == "behind" && ahead_by == 0 && (behind_by.present? && behind_by > 0)
|
||||
status == "behind" && ahead_by == 0 && behind_by.present? && behind_by > 0
|
||||
end
|
||||
|
||||
def compare_commits(sha_a, sha_b)
|
||||
|
||||
@@ -78,7 +78,7 @@ module OpenIDConnect
|
||||
# Client ID and Client Secret must be form-encoded. Otherwise characters such as colon (:)
|
||||
# would not be allowed in the Client ID, since HTTP Basic Auth does not support it
|
||||
# as per https://datatracker.ietf.org/doc/html/rfc7617#section-2
|
||||
OpenProject.httpx.basic_auth(CGI.escape(provider.client_id), CGI.escape(provider.client_secret))
|
||||
OpenProject.httpx.plugin(:basic_auth).basic_auth(CGI.escape(provider.client_id), CGI.escape(provider.client_secret))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -40,6 +40,7 @@ class NextcloudApplicationCredentialsValidator
|
||||
|
||||
response = OpenProject
|
||||
.httpx
|
||||
.plugin(:basic_auth)
|
||||
.basic_auth(contract.username, contract.password)
|
||||
.head(Storages::UrlBuilder.url(contract.model.uri, "remote.php/dav"))
|
||||
case response
|
||||
|
||||
Reference in New Issue
Block a user