@@ -7,8 +7,8 @@ namespace Fido2NetLib;
7
7
8
8
public class Fido2Configuration
9
9
{
10
- private ISet < string > _origins ;
11
- private ISet < string > _fullyQualifiedOrigins ;
10
+ private IReadOnlySet < string > _origins ;
11
+ private IReadOnlySet < string > _fullyQualifiedOrigins ;
12
12
13
13
/// <summary>
14
14
/// Create the configuration for Fido2.
@@ -34,7 +34,7 @@ public Fido2Configuration()
34
34
public int ChallengeSize { get ; set ; } = 16 ;
35
35
36
36
/// <summary>
37
- /// The effetive domain of the RP. Should be unique and will be used as the identity for the RP.
37
+ /// The effective domain of the RP. Should be unique and will be used as the identity for the RP.
38
38
/// </summary>
39
39
public string ServerDomain { get ; set ; }
40
40
@@ -48,30 +48,16 @@ public Fido2Configuration()
48
48
/// </summary>
49
49
public string ServerIcon { get ; set ; }
50
50
51
- /// <summary>
52
- /// Server origin, including protocol host and port.
53
- /// </summary>
54
- [ Obsolete ( "This property is obsolete. Use Origins instead." ) ]
55
- public string Origin { get ; set ; }
56
-
57
51
/// <summary>
58
52
/// Server origins, including protocol host and port.
59
53
/// </summary>
60
- public ISet < string > Origins
54
+ public IReadOnlySet < string > Origins
61
55
{
62
56
get
63
57
{
64
58
if ( _origins == null )
65
59
{
66
- _origins = new HashSet < string > ( ) ;
67
-
68
- // Since we're depricating Origin we ease the transition to move the value automatically, unless its null
69
- #pragma warning disable CS0618 // Type or member is obsolete
70
- if ( Origin != null )
71
- {
72
- _origins . Add ( Origin ) ;
73
- }
74
- #pragma warning restore CS0618 // Type or member is obsolete
60
+ _origins = new HashSet < string > ( 0 ) ;
75
61
}
76
62
77
63
return _origins ;
@@ -87,15 +73,17 @@ public ISet<string> Origins
87
73
/// <summary>
88
74
/// Fully Qualified Server origins, generated automatically from Origins.
89
75
/// </summary>
90
- public ISet < string > FullyQualifiedOrigins
76
+ public IReadOnlySet < string > FullyQualifiedOrigins
91
77
{
92
- get => _fullyQualifiedOrigins ?? new HashSet < string >
78
+ get
93
79
{
94
- #pragma warning disable CS0618
95
- Origin ? . ToFullyQualifiedOrigin ( )
96
- #pragma warning restore CS0618
97
- } ;
98
- private set => _fullyQualifiedOrigins = value ;
80
+ if ( _fullyQualifiedOrigins == null )
81
+ {
82
+ Origins = new HashSet < string > ( 0 ) ;
83
+ }
84
+
85
+ return _fullyQualifiedOrigins ;
86
+ }
99
87
}
100
88
101
89
/// <summary>
0 commit comments