Merge pull request #6 from AnonymousDotNet/lida_dev
Add User Phone Attribute
This commit is contained in:
commit
8d2c05e8e7
|
|
@ -9,4 +9,5 @@ public interface IUserIdentity
|
|||
string LastName { get; }
|
||||
string FullName { get; }
|
||||
string? UserLanguage { get; }
|
||||
string? Phone { get; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue