Creates a JWT # Errors when could not convert user claims to jwt token
(&self, secret: &str, expiration: u64)
| 192 | /// |
| 193 | /// when could not convert user claims to jwt token |
| 194 | pub fn generate_jwt(&self, secret: &str, expiration: u64) -> ModelResult<String> { |
| 195 | Ok(jwt::JWT::new(secret).generate_token( |
| 196 | expiration, |
| 197 | self.pid.to_string(), |
| 198 | serde_json::Map::new(), |
| 199 | )?) |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | impl super::_entities::users::ActiveModel { |