refresh_tokens: add app inside each refresh token

This commit is contained in:
Philippe Loctaux 2023-04-02 01:10:27 +02:00
parent 2caf584cb7
commit 956f28f7e5
11 changed files with 109 additions and 75 deletions

View file

@ -9,6 +9,7 @@ pub struct RefreshTokens {
pub token: String,
pub ip_address: String,
pub user: String,
pub app: String,
// Timings
pub created_at: DateTime<Utc>,
@ -23,6 +24,7 @@ impl RefreshTokens {
token: &str,
ip_address: &str,
user: &str,
app: &str,
expires_at: i64,
) -> Result<Option<()>, Error> {
let query: SqliteQueryResult = sqlx::query_file!(
@ -30,6 +32,7 @@ impl RefreshTokens {
token,
ip_address,
user,
app,
expires_at
)
.execute(conn)