-
-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathconfiguration.rb
More file actions
68 lines (57 loc) · 1.66 KB
/
configuration.rb
File metadata and controls
68 lines (57 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# frozen_string_literal: true
require 'forwardable'
require 'webauthn/relying_party'
module WebAuthn
def self.configuration
@configuration ||= Configuration.new
end
def self.configure
yield(configuration)
end
class Configuration
extend Forwardable
def_delegators :@relying_party,
:algorithms,
:algorithms=,
:encoding,
:encoding=,
:origin,
:origin=,
:allowed_origins,
:allowed_origins=,
:allowed_top_origins,
:allowed_top_origins=,
:verify_attestation_statement,
:verify_attestation_statement=,
:verify_cross_origin,
:verify_cross_origin=,
:credential_options_timeout,
:credential_options_timeout=,
:silent_authentication,
:silent_authentication=,
:acceptable_attestation_types,
:acceptable_attestation_types=,
:attestation_root_certificates_finders,
:attestation_root_certificates_finders=,
:encoder,
:encoder=,
:legacy_u2f_appid,
:legacy_u2f_appid=
attr_reader :relying_party
def initialize
@relying_party = RelyingParty.new
end
def rp_name
relying_party.name
end
def rp_name=(name)
relying_party.name = name
end
def rp_id
relying_party.id
end
def rp_id=(id)
relying_party.id = id
end
end
end