data
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
DEFINE FUNCTION auth::sessiontoken::new($user: uuid) {
|
||||
LET $token = rand::string(64);
|
||||
|
||||
CREATE SessionToken CONTENT {
|
||||
id: rand::uuid::v4(),
|
||||
created: time::now(),
|
||||
expires: time::now() + 7d,
|
||||
token: $token,
|
||||
user: Entity:user,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user