Skip to content

Commit e1b26bc

Browse files
refactor: move WebAuthn.standard_encoder to lib/webauthn/encoders.rb
1 parent ac2c934 commit e1b26bc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/webauthn/encoder.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
require "webauthn/encoders"
55

66
module WebAuthn
7-
def self.standard_encoder
8-
@standard_encoder ||= Encoder.new
9-
end
10-
117
class Encoder
128
extend Forwardable
139

lib/webauthn/encoders.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# frozen_string_literal: true
22

33
module WebAuthn
4+
def self.standard_encoder
5+
@standard_encoder ||= Encoders.lookup
6+
end
7+
48
module Encoders
59
# https://www.w3.org/TR/webauthn-2/#base64url-encoding
610
STANDARD_ENCODING = :base64url

0 commit comments

Comments
 (0)