Bug: Use mget to check in Blocklist Kv



Use MGet to check whether check multiple values in blocklist.
diff --git a/crates/router/src/services/authentication/blacklist.rs b/crates/router/src/services/authentication/blacklist.rs
index 346e563ee32..3a386c7793c 100644
--- a/crates/router/src/services/authentication/blacklist.rs
+++ b/crates/router/src/services/authentication/blacklist.rs
@@ -66,19 +66,25 @@ pub async fn check_user_in_blacklist<A: AppStateInfo>(
         .map(|timestamp| timestamp.map_or(false, |timestamp| timestamp > token_issued_at))
 }
 
-pub async fn check_role_in_blacklist<A: AppStateInfo>(
+pub async fn check_user_and_role_in_blacklist<A: AppStateInfo>(
     state: &A,
+    user_id: &str,
     role_id: &str,
     token_expiry: u64,
 ) -> RouterResult<bool> {
-    let token = format!("{}{}", ROLE_BLACKLIST_PREFIX, role_id);
+    let user_token = format!("{}{}", USER_BLACKLIST_PREFIX, user_id);
+    let role_token = format!("{}{}", ROLE_BLACKLIST_PREFIX, role_id);
     let token_issued_at = expiry_to_i64(token_expiry - JWT_TOKEN_TIME_IN_SECS)?;
     let redis_conn = get_redis_connection(state)?;
-    redis_conn
-        .get_key::<Option<i64>>(token.as_str())
+
+    Ok(redis_conn
+        .get_multiple_keys::<Vec<&str>, i64>(vec![user_token.as_str(), role_token.as_str()])
         .await
-        .change_context(ApiErrorResponse::InternalServerError)
-        .map(|timestamp| timestamp.map_or(false, |timestamp| timestamp > token_issued_at))
+        .change_context(ApiErrorResponse::InternalServerError)?
+        .into_iter()
+        .max()
+        .flatten()
+        .map_or(false, |timestamp| timestamp > token_issued_at))
 }
 
 #[cfg(feature = "email")]
@@ -136,10 +142,7 @@ impl BlackList for AuthToken {
     where
         A: AppStateInfo + Sync,
     {
-        Ok(
-            check_user_in_blacklist(state, &self.user_id, self.exp).await?
-                || check_role_in_blacklist(state, &self.role_id, self.exp).await?,
-        )
+        check_user_and_role_in_blacklist(state, &self.user_id, &self.role_id, self.exp).await
     }
 }
 

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
Use MGet to check whether role or user is blacklisted in KV. Instead of checking user and role separately, MGet can help to do it in one call.


### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
Enhancement

## How did you test it?
Singup --> Sigin --> Create a new role --> Invite new user with newly created role --> Sign In new user --> perform some operations which the user with assigned role can perform --> now update the role --> try performing same operation for the newly invited user. It won't be valid since role has been blocklist.
Can also check KV for blocklisted role_id and user_id.

Curls for singup/singin

curl --location 'http://localhost:8080/user/signup' \
--header 'Content-Type: application/json' \
--header 'Cookie: token=JWT' \
--data-raw '{
    "email": "test121@juspay.in",
    "password": "Test@12",
    "country": "IN"
}
'
curl --location 'http://localhost:8080/user/signin' \
--header 'Content-Type: application/json' \
--header 'Cookie: token=JWT' \
--data-raw '{
    "email": "test12345@juspay.in",
    "password": "260e5c5c-dc96-4cb9-870c-eb18ab8ab577"

}'
Create Role:

curl --location 'http://localhost:8080/user/role' \
--header 'Authorization: Bearer JWT' \
--header 'Content-Type: application/json' \
--data '{
  "role_name": "test",
  "groups": ["operations_view", "operations_manage"],
  "role_scope": "organization"
}'
Update Role:

curl --location --request PUT 'http://localhost:8080/user/role/role_QvY913dYo2b05D64bJ8l' \
--header 'Authorization: Bearer JWT' \
--header 'Content-Type: application/json' \
--data '{

  "groups": ["operations_view"]

}'

## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
