Merge pull request #6 from AnonymousDotNet/lida_dev

Add User Phone Attribute
This commit is contained in:
Haiping 2024-08-06 05:55:09 -05:00 committed by GitHub
commit 8d2c05e8e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -9,4 +9,5 @@ public interface IUserIdentity
string LastName { get; }
string FullName { get; }
string? UserLanguage { get; }
string? Phone { get; }
}

View file

@ -40,7 +40,7 @@ public class UserIdentity : IUserIdentity
}
[JsonPropertyName("last_name")]
public string LastName
public string LastName
=> _claims?.FirstOrDefault(x => x.Type == ClaimTypes.Surname)?.Value!;
[JsonPropertyName("full_name")]
@ -66,4 +66,7 @@ public class UserIdentity : IUserIdentity
return languages.FirstOrDefault();
}
}
[JsonPropertyName("phone")]
public string? Phone => _claims?.FirstOrDefault(x => x.Type == "phone")?.Value;
}