diff --git a/lib/webauthn/authenticator_assertion_response.rb b/lib/webauthn/authenticator_assertion_response.rb index 0c28b0ee..d0368b68 100644 --- a/lib/webauthn/authenticator_assertion_response.rb +++ b/lib/webauthn/authenticator_assertion_response.rb @@ -32,7 +32,7 @@ def self.from_client(response) attr_reader :user_handle def initialize(authenticator_data:, signature:, user_handle: nil, **options) - super(options) + super(**options) @authenticator_data_bytes = authenticator_data @signature = signature diff --git a/lib/webauthn/authenticator_attestation_response.rb b/lib/webauthn/authenticator_attestation_response.rb index ae7b789f..aa080803 100644 --- a/lib/webauthn/authenticator_attestation_response.rb +++ b/lib/webauthn/authenticator_attestation_response.rb @@ -27,7 +27,7 @@ def self.from_client(response) attr_reader :attestation_type, :attestation_trust_path def initialize(attestation_object:, **options) - super(options) + super(**options) @attestation_object = attestation_object end diff --git a/lib/webauthn/authenticator_response.rb b/lib/webauthn/authenticator_response.rb index d16c9e6f..8aec87be 100644 --- a/lib/webauthn/authenticator_response.rb +++ b/lib/webauthn/authenticator_response.rb @@ -45,8 +45,8 @@ def verify(expected_challenge, expected_origin = nil, user_verification: nil, rp true end - def valid?(*args) - verify(*args) + def valid?(*args, **keyword_arguments) + verify(*args, **keyword_arguments) rescue WebAuthn::VerificationError false end diff --git a/lib/webauthn/credential.rb b/lib/webauthn/credential.rb index 7c8810c5..91931601 100644 --- a/lib/webauthn/credential.rb +++ b/lib/webauthn/credential.rb @@ -7,12 +7,12 @@ module WebAuthn module Credential - def self.options_for_create(*args) - WebAuthn::PublicKeyCredential::CreationOptions.new(*args) + def self.options_for_create(**keyword_arguments) + WebAuthn::PublicKeyCredential::CreationOptions.new(**keyword_arguments) end - def self.options_for_get(*args) - WebAuthn::PublicKeyCredential::RequestOptions.new(*args) + def self.options_for_get(**keyword_arguments) + WebAuthn::PublicKeyCredential::RequestOptions.new(**keyword_arguments) end def self.from_create(credential) diff --git a/lib/webauthn/public_key_credential/creation_options.rb b/lib/webauthn/public_key_credential/creation_options.rb index 50868704..113f7ec7 100644 --- a/lib/webauthn/public_key_credential/creation_options.rb +++ b/lib/webauthn/public_key_credential/creation_options.rb @@ -42,14 +42,14 @@ def initialize( rp[:name] ||= configuration.rp_name rp[:id] ||= configuration.rp_id - RPEntity.new(rp) + RPEntity.new(**rp) else rp end @user = if user.is_a?(Hash) - UserEntity.new(user) + UserEntity.new(**user) else user end