ezidam: header: display name, username, email
This commit is contained in:
parent
c9ef821d2b
commit
9172155893
4 changed files with 16 additions and 17 deletions
|
|
@ -17,6 +17,7 @@ pub struct JwtClaims {
|
|||
|
||||
// Custom claims
|
||||
pub username: String,
|
||||
pub name: Option<String>,
|
||||
pub email: Option<String>,
|
||||
pub is_admin: bool,
|
||||
pub roles: Vec<String>,
|
||||
|
|
@ -37,6 +38,7 @@ impl JwtClaims {
|
|||
|
||||
// Custom claims
|
||||
username: user.username().to_string(),
|
||||
name: user.name().map(String::from),
|
||||
email: user.email().map(String::from),
|
||||
is_admin: user.is_admin(),
|
||||
roles,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue