instance method
Gem::GemcutterUtilities::WebauthnPoller#webauthn_verification_poll_response
webauthn_verification_poll_response(webauthn_url, credentials)
lib/rubygems/gemcutter_utilities/webauthn_poller.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/gemcutter_utilities/webauthn_poller.rb, line 67
def webauthn_verification_poll_response(webauthn_url, credentials)
webauthn_token = %r{(?<=\/)[^\/]+(?=$)}.match(webauthn_url)[0]
rubygems_api_request(:get, "api/v1/webauthn_verification/#{webauthn_token}/status.json") do |request|
if credentials.empty?
request.add_field "Authorization", api_key
elsif credentials[:identifier] && credentials[:password]
request.basic_auth credentials[:identifier], credentials[:password]
else
raise Gem::WebauthnVerificationError, "Provided missing credentials"
end
end
end
No documentation available