- add: redis cache refresh function sets the ttl for a key

- update: session service refresh session function now just updates the ttl of the session instead of calling set
This commit is contained in:
2025-03-09 17:08:56 -04:00
parent 0dc69bcfcf
commit 14c6aa485a
7 changed files with 81 additions and 67 deletions

View File

@@ -1,7 +1,7 @@
use crate::auth::auth_service_client::AuthServiceClient;
use crate::auth::{
LoginRequest, LoginResponse, LogoutRequest, ValidateSessionRequest, ValidateSessionResponse,
ValidateTokenRequest, ValidateTokenResponse,
LoginRequest, LoginResponse, LogoutRequest, RefreshSessionResponse, ValidateSessionRequest,
ValidateSessionResponse, ValidateTokenRequest, ValidateTokenResponse,
};
use crate::common::Empty;
use tonic::transport::Channel;
@@ -60,7 +60,7 @@ impl AuthClient {
pub async fn refresh_session(
&mut self,
session_id: &str,
) -> Result<ValidateSessionResponse, Box<dyn std::error::Error + Send + Sync>> {
) -> Result<RefreshSessionResponse, Box<dyn std::error::Error + Send + Sync>> {
let request = ValidateSessionRequest {
session_id: session_id.to_string(),
};