@@ -111,6 +111,52 @@ private set
111111 }
112112 }
113113
114+ /// <summary>
115+ /// Gets the user's display name, if available.
116+ /// </summary>
117+ /// <returns>a display name string or null.</returns>
118+ public string DisplayName
119+ {
120+ get => this . displayName ;
121+ }
122+
123+ /// <summary>
124+ /// Gets the user's email address, if available.
125+ /// </summary>
126+ /// <returns>an email address string or null.</returns>
127+ public string Email
128+ {
129+ get => this . email ;
130+ }
131+
132+ /// <summary>
133+ /// Gets the user's phone number.
134+ /// </summary>
135+ /// <returns>a phone number string or null.</returns>
136+ public string PhoneNumber
137+ {
138+ get => this . phoneNumber ;
139+ }
140+
141+ /// <summary>
142+ /// Gets the user's photo URL, if available.
143+ /// </summary>
144+ /// <returns>a URL string or null.</returns>
145+ public string PhotoUrl
146+ {
147+ get => this . photoUrl ;
148+ }
149+
150+ /// <summary>
151+ /// Gets the ID of the identity provider. This can be a short domain name (e.g. google.com) or
152+ /// the identifier of an OpenID identity provider.
153+ /// </summary>
154+ /// <returns>an ID string that uniquely identifies the identity provider.</returns>
155+ public string ProviderId
156+ {
157+ get => UserRecord . PROVIDERID ;
158+ }
159+
114160 /// <summary>
115161 /// Gets a value indicating whether the user's email address is verified or not.
116162 /// </summary>
@@ -124,7 +170,7 @@ private set
124170 /// <summary>
125171 /// Gets a list of provider data for this user.
126172 /// </summary>
127- public List < ProviderUserInfo > Providers => this . providers ;
173+ public IEnumerable < IUserInfo > Providers => this . providers ;
128174
129175 /// <summary>
130176 /// Gets a timestamp representing the date and time that this token will become active.
@@ -170,43 +216,6 @@ public static void CheckUid(string uid)
170216 }
171217 }
172218
173- /// <summary>
174- /// Returns the user's unique ID assigned by the identity provider.
175- /// </summary>
176- /// <returns>a user ID string.</returns>
177- public string GetUid ( ) => this . uid ;
178-
179- /// <summary>
180- /// Returns the user's display name, if available.
181- /// </summary>
182- /// <returns>a display name string or null.</returns>
183- public string GetDisplayName ( ) => this . displayName ;
184-
185- /// <summary>
186- /// Returns the user's email address, if available.
187- /// </summary>
188- /// <returns>an email address string or null.</returns>
189- public string GetEmail ( ) => this . email ;
190-
191- /// <summary>
192- /// Gets the user's phone number.
193- /// </summary>
194- /// <returns>a phone number string or null.</returns>
195- public string GetPhoneNumber ( ) => this . phoneNumber ;
196-
197- /// <summary>
198- /// Returns the user's photo URL, if available.
199- /// </summary>
200- /// <returns>a URL string or null.</returns>
201- public string GetPhotoUrl ( ) => this . photoUrl ;
202-
203- /// <summary>
204- /// Returns the ID of the identity provider. This can be a short domain name (e.g. google.com) or
205- /// the identifier of an OpenID identity provider.
206- /// </summary>
207- /// <returns>an ID string that uniquely identifies the identity provider.</returns>
208- public string GetProviderId ( ) => UserRecord . PROVIDERID ;
209-
210219 /// <summary>
211220 /// Checks if the given set of custom claims are valid.
212221 /// </summary>
@@ -246,17 +255,15 @@ private static string SerializeClaims(IReadOnlyDictionary<string, object> claims
246255 return NewtonsoftJsonSerializer . Instance . Serialize ( claims ) ;
247256 }
248257
249- private static ReadOnlyDictionary < string , object > ParseCustomClaims ( string customClaims )
258+ private static IReadOnlyDictionary < string , object > ParseCustomClaims ( string customClaims )
250259 {
251260 if ( string . IsNullOrEmpty ( customClaims ) )
252261 {
253- return new ReadOnlyDictionary < string , object > ( new Dictionary < string , object > ( ) ) ;
262+ return new Dictionary < string , object > ( ) ;
254263 }
255264 else
256265 {
257- var parsed = NewtonsoftJsonSerializer . Instance . Deserialize < Dictionary < string , object > > ( customClaims ) ;
258-
259- return new ReadOnlyDictionary < string , object > ( parsed ) ;
266+ return NewtonsoftJsonSerializer . Instance . Deserialize < Dictionary < string , object > > ( customClaims ) ;
260267 }
261268 }
262269 }
0 commit comments