diff --git a/lib/webauthn/relying_party.rb b/lib/webauthn/relying_party.rb index 2b6db690..a9ec0900 100644 --- a/lib/webauthn/relying_party.rb +++ b/lib/webauthn/relying_party.rb @@ -48,7 +48,6 @@ def initialize( end attr_accessor :algorithms, - :encoding, :allowed_origins, :allowed_top_origins, :id, @@ -60,7 +59,7 @@ def initialize( :acceptable_attestation_types, :legacy_u2f_appid - attr_reader :attestation_root_certificates_finders + attr_reader :encoding, :attestation_root_certificates_finders # This is the user-data encoder. # Used to decode user input and to encode data provided to the user. @@ -68,6 +67,13 @@ def encoder @encoder ||= WebAuthn::Encoder.new(encoding) end + attr_writer :encoder + + def encoding=(encoding) + @encoding = encoding + @encoder = nil + end + def attestation_root_certificates_finders=(finders) if !finders.respond_to?(:each) finders = [finders]