Skip to content

Commit

Permalink
some clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
archeoss committed Dec 1, 2023
1 parent 08465d6 commit ae6e12d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
6 changes: 0 additions & 6 deletions backend/src/connector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ impl HttpsBuilder {
}
}

// FIXME: This should be generic type on main (and cluster) fields
// Reasons why it's not:
// AuthUser can't be implemented for generic types, since it requires 'static lifetime on trait implemetations.
// Implementing it on some concrete type still requires specifying a generic type
// on `Client`'s `index_marker` field.
// `dyn` type can provide the required polymorhism, but it's suboptimal (probably).
#[derive(Clone)]
pub struct BobClient<Client: ApiNoContext<ClientContext> + Send + Sync> {
/// Unique Identifier
Expand Down
22 changes: 0 additions & 22 deletions backend/src/services/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,28 +159,6 @@ impl<User, UserId, UserStore, Client> AuthState<User, UserId, UserStore, Client>
}
}

// #[async_trait]
// pub trait Auth<Id, User> {
// const AUTH_DATA_KEY: &'static str = "_auth_data";
//
// /// Login user to a Session
// ///
// /// # Errors
// ///
// /// This function will return an error if the user couldn't be loaded from provided store or
// /// the user couldn't be serialized
// async fn login(&mut self, user_id: &Id) -> Result<(), AuthError>;
//
// /// Logout user from a Session
// ///
// /// # Errors
// ///
// /// This function will return an error if the user couldn't be loaded from provided store or
// /// the user couldn't be serialized
// fn logout(&mut self) -> Result<(), AuthError>;
// fn user(&self) -> Option<User>;
// }

#[derive(Debug, Clone)]
pub struct AuthStore<User, Id, Client, SessionStore>
where
Expand Down

0 comments on commit ae6e12d

Please sign in to comment.