summaryrefslogtreecommitdiff
path: root/cli/auth_tokens.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/auth_tokens.rs')
-rw-r--r--cli/auth_tokens.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/auth_tokens.rs b/cli/auth_tokens.rs
index 6c3ed3846..2e0a4bc37 100644
--- a/cli/auth_tokens.rs
+++ b/cli/auth_tokens.rs
@@ -1,5 +1,7 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
+use base64::prelude::BASE64_STANDARD;
+use base64::Engine;
use deno_core::ModuleSpecifier;
use log::debug;
use log::error;
@@ -23,7 +25,7 @@ impl fmt::Display for AuthToken {
AuthTokenData::Bearer(token) => write!(f, "Bearer {token}"),
AuthTokenData::Basic { username, password } => {
let credentials = format!("{username}:{password}");
- write!(f, "Basic {}", base64::encode(credentials))
+ write!(f, "Basic {}", BASE64_STANDARD.encode(credentials))
}
}
}