baserow_rs/api/
authentication.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use serde::{Deserialize, Serialize};

#[derive(Serialize)]
pub struct LoginRequest {
    pub email: String,
    pub password: String,
}

#[derive(Deserialize)]
pub struct TokenResponse {
    pub access_token: String,
    pub refresh_token: String,
    pub token: String,
    pub user: User,
}

#[derive(Deserialize, Clone)]
pub struct User {
    pub first_name: String,
    pub username: String,
    pub language: String,
}

#[derive(Deserialize)]
pub struct TokenAuthErrorResponse {
    pub error: String,
}