Skip to content

Commit

Permalink
fix: add get_action_auth_with_token again (#4298)
Browse files Browse the repository at this point in the history
  • Loading branch information
fraidev authored Dec 13, 2024
1 parent 0b1fb75 commit 853bbec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/fluvio-hub-util/src/hubaccess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ impl HubAccess {
self.get_action_auth(ACTION_PUBLISH).await
}

pub async fn get_action_auth_with_token(
&self,
action: &str,
authn_token: &str,
remote: &str,
) -> Result<String> {
let access_token = AccessToken::V3((authn_token.to_string(), remote.to_string()));
self.make_action_token(action, Some(access_token)).await
}

async fn get_action_auth(&self, action: &str) -> Result<String> {
let access_token = read_access_token().ok();
self.make_action_token(action, access_token).await
Expand Down

0 comments on commit 853bbec

Please sign in to comment.