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

Method generate_jwt

examples/react_admin/backend/src/models/users.rs:194–196  ·  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(expiration, self.pid.to_string(), None)?)
196 }
197}
198
199impl super::_entities::users::ActiveModel {

Callers 1

loginFunction · 0.45

Calls 1

newFunction · 0.50

Tested by

no test coverage detected