Skip to content

Commit

Permalink
pass reference
Browse files Browse the repository at this point in the history
  • Loading branch information
jedleggett committed May 1, 2023
1 parent 7b5bfdf commit fd0fa7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/proxy/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ pub async fn maybe_refresh_auth_tokens(
} else if should_refresh_access {
let new_access_token = timeout(
*connection_timeout,
refresh_access_token(auth_service_client, refresh_token.clone()),
refresh_access_token(auth_service_client, refresh_token),
)
.await
.map_err(|_| ProxyError::MethodTimeout("refresh_access_token".to_string()))?
Expand All @@ -161,11 +161,11 @@ pub async fn maybe_refresh_auth_tokens(

pub async fn refresh_access_token(
auth_service_client: &mut AuthServiceClient<Channel>,
refresh_token: Token,
refresh_token: &Token,
) -> crate::proxy::Result<Token> {
let response = auth_service_client
.refresh_access_token(RefreshAccessTokenRequest {
refresh_token: refresh_token.value,
refresh_token: refresh_token.value.clone(),
})
.await
.map_err(|e| ProxyError::AuthenticationError(e.to_string()))?;
Expand Down

0 comments on commit fd0fa7d

Please sign in to comment.