add basic account creation
This commit is contained in:
parent
7a0247b551
commit
7959b64fe6
4 changed files with 44 additions and 5 deletions
|
@ -24,4 +24,17 @@ public class Token : BaseModel
|
|||
|
||||
return (token, hash);
|
||||
}
|
||||
|
||||
public static (string, Token) Create(Account? account, Application application, string[] scopes, Instant expires)
|
||||
{
|
||||
var (token, hash) = Generate();
|
||||
return (token, new()
|
||||
{
|
||||
Hash = hash,
|
||||
Scopes = scopes,
|
||||
Expires = expires,
|
||||
Account = account,
|
||||
Application = application,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue