@@ -14,6 +14,7 @@ public class User : IEquatable<User>, ICloneable
1414 { JwtRegisteredClaimNames . Sub , new KeyValuePair < Action < User , string > , Func < User , object > > ( ( u , str ) => u . Name = str , ( u ) => u . Name ) } ,
1515 { JwtRegisteredClaimNames . Name , new KeyValuePair < Action < User , string > , Func < User , object > > ( ( u , str ) => u . Firstname = str , ( u ) => u . Firstname ) } ,
1616 { JwtRegisteredClaimNames . FamilyName , new KeyValuePair < Action < User , string > , Func < User , object > > ( ( u , str ) => u . Lastname = str , ( u ) => u . Lastname ) } ,
17+ { JwtRegisteredClaimNames . MiddleName , new KeyValuePair < Action < User , string > , Func < User , object > > ( ( u , str ) => u . Middlename = str , ( u ) => u . Middlename ) } ,
1718 { JwtRegisteredClaimNames . Email , new KeyValuePair < Action < User , string > , Func < User , object > > ( ( u , str ) => u . Email = str , ( u ) => u . Email ) } ,
1819 { "email_verified" , new KeyValuePair < Action < User , string > , Func < User , object > > ( ( u , str ) => u . EmailVerified = bool . Parse ( str ) , ( u ) => u . EmailVerified ) }
1920 } ;
@@ -206,25 +207,21 @@ public void RejectConsent(string consentId)
206207
207208 public void UpdateEmail ( string value )
208209 {
209- Email = value ;
210210 UpdateClaim ( JwtRegisteredClaimNames . Email , value ) ;
211211 }
212212
213213 public void UpdateName ( string value )
214214 {
215- Name = value ;
216215 UpdateClaim ( JwtRegisteredClaimNames . Name , value ) ;
217216 }
218217
219218 public void UpdateLastname ( string value )
220219 {
221- Lastname = value ;
222220 UpdateClaim ( JwtRegisteredClaimNames . FamilyName , value ) ;
223221 }
224222
225223 public void UpdateMiddlename ( string value )
226224 {
227- Middlename = value ;
228225 UpdateClaim ( JwtRegisteredClaimNames . MiddleName , value ) ;
229226 }
230227
@@ -238,7 +235,9 @@ public void UpdateClaim(string key, string value)
238235
239236 var claim = OAuthUserClaims . FirstOrDefault ( c => c . Name == key ) ;
240237 if ( claim != null )
238+ {
241239 claim . Value = value ;
240+ }
242241 else
243242 {
244243 OAuthUserClaims . Add ( new UserClaim
0 commit comments