feat(auth): simplify auth model and implement bootstrap flow
Remove key_identity indirection table, storing public keys and nonces directly on client tables. Replace AuthResponse with AuthOk, add a BootstrapActor to manage token lifecycle, and move user agent stream handling into the actor module.
This commit is contained in:
@@ -28,21 +28,12 @@ pub struct ArbiterSetting {
|
||||
pub cert: Vec<u8>,
|
||||
}
|
||||
|
||||
#[derive(Queryable, Debug)]
|
||||
#[diesel(table_name = schema::key_identity, check_for_backend(Sqlite))]
|
||||
pub struct KeyIdentity {
|
||||
pub id: i32,
|
||||
pub name: String,
|
||||
pub public_key: String,
|
||||
pub created_at: i32,
|
||||
pub updated_at: i32,
|
||||
}
|
||||
|
||||
#[derive(Queryable, Debug)]
|
||||
#[diesel(table_name = schema::program_client, check_for_backend(Sqlite))]
|
||||
pub struct ProgramClient {
|
||||
pub id: i32,
|
||||
pub key_identity_id: i32,
|
||||
pub public_key: Vec<u8>,
|
||||
pub nonce: i32,
|
||||
pub created_at: i32,
|
||||
pub updated_at: i32,
|
||||
}
|
||||
@@ -51,7 +42,8 @@ pub struct ProgramClient {
|
||||
#[diesel(table_name = schema::useragent_client, check_for_backend(Sqlite))]
|
||||
pub struct UseragentClient {
|
||||
pub id: i32,
|
||||
pub key_identity_id: i32,
|
||||
pub public_key: Vec<u8>,
|
||||
pub nonce: i32,
|
||||
pub created_at: i32,
|
||||
pub updated_at: i32,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user