MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / generate_jwt

Method generate_jwt

examples/loco_seaography/src/models/users.rs:194–200  ·  view source on GitHub ↗

Creates a JWT # Errors when could not convert user claims to jwt token

(&self, secret: &str, expiration: u64)

Source from the content-addressed store, hash-verified

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
203impl super::_entities::users::ActiveModel {

Callers 1

loginFunction · 0.45

Calls 1

newFunction · 0.50

Tested by

no test coverage detected