mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-11 03:39:49 +08:00
fix(gateway): add provider key concurrency and cache affinity modes
This commit is contained in:
@@ -374,10 +374,9 @@ impl ProviderOAuthAdapter for GenericProviderOAuthAdapter {
|
||||
ctx: &ProviderOAuthTransportContext,
|
||||
account: &ProviderOAuthAccount,
|
||||
) -> Result<ProviderOAuthTokenSet, OAuthError> {
|
||||
let refresh_token = account
|
||||
.auth_config
|
||||
.get("refresh_token")
|
||||
.and_then(Value::as_str)
|
||||
let refresh_token = ["refresh_token", "refreshToken"]
|
||||
.iter()
|
||||
.find_map(|field| account.auth_config.get(*field).and_then(Value::as_str))
|
||||
.map(str::trim)
|
||||
.filter(|value| !value.is_empty())
|
||||
.ok_or_else(|| OAuthError::invalid_request("auth_config missing refresh_token"))?;
|
||||
|
||||
Reference in New Issue
Block a user