- add: ability to refresh the current session
- add: delete type to delete character request - add: ability to update key in redis - add: handle alive packet to refresh the session - fix: delete now actually returns the time remaining correctly - fix: character list now has the correct time until character deletion
This commit is contained in:
@@ -42,6 +42,15 @@ impl AuthClient {
|
||||
Ok(response.into_inner())
|
||||
}
|
||||
|
||||
pub async fn refresh_session(&mut self, session_id: &str) -> Result<ValidateSessionResponse, Box<dyn std::error::Error + Send + Sync>> {
|
||||
let request = ValidateSessionRequest {
|
||||
session_id: session_id.to_string()
|
||||
};
|
||||
|
||||
let response = self.client.refresh_session(request).await?;
|
||||
Ok(response.into_inner())
|
||||
}
|
||||
|
||||
pub async fn logout(&mut self, session_id: &str) -> Result<Empty, Box<dyn std::error::Error + Send + Sync>> {
|
||||
let request = LogoutRequest {
|
||||
session_id: session_id.to_string(),
|
||||
|
||||
Reference in New Issue
Block a user