Skip to content

Commit

Permalink
Update dependency versions to latest
Browse files Browse the repository at this point in the history
Also update now-deprecated base64 function usage
  • Loading branch information
Celeo committed Mar 13, 2023
1 parent 4210c89 commit 521fdbb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rfesi"
version = "0.14.1"
version = "0.15.0"
authors = ["Celeo <[email protected]>"]
edition = "2021"
description = "Rust API for EVE Online's ESI"
Expand All @@ -15,20 +15,20 @@ categories = ["api-bindings"]

[dependencies]
alcoholic_jwt = { version = "4091.0.0", optional = true }
base64 = "0.13"
http = "0.2.1"
log = "0.4.8"
base64 = "0.21.0"
http = "0.2.9"
log = "0.4.17"
rand = { version = "0.8.5", optional = true }
reqwest = { version = "0.11.0", features = ["json"] }
serde = { version = "1.0.113", features = ["derive"] }
serde_json = "1.0.55"
thiserror = "1.0.20"
reqwest = { version = "0.11.14", features = ["json"] }
serde = { version = "1.0.155", features = ["derive"] }
serde_json = "1.0.94"
thiserror = "1.0.39"

[dev-dependencies]
mockito = "0.31"
mockito = "1.0.0"
pretty_env_logger = "0.4.0"
rusty-hook = "0.11.2"
tokio = { version = "1.21.2", features = ["full"] }
tokio = { version = "1.26.0", features = ["full"] }

[features]
default = ["random_state", "validate_jwt"]
Expand Down
14 changes: 8 additions & 6 deletions src/client.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Main logic
use crate::{groups::*, prelude::*};
use base64::engine::{general_purpose::STANDARD as base64, Engine};
use log::{debug, error};
use rand::{distributions::Alphanumeric, Rng};
use reqwest::{
Expand Down Expand Up @@ -210,12 +211,13 @@ impl Esi {
fn get_auth_headers(&self) -> EsiResult<HeaderMap> {
self.check_client_info()?;
let mut map = HeaderMap::new();
let value = base64::encode(format!(
"{}:{}",
self.client_id.as_ref().unwrap(),
self.client_secret.as_ref().unwrap()
))
.replace(['\n', ' '], "");
let value = base64
.encode(format!(
"{}:{}",
self.client_id.as_ref().unwrap(),
self.client_secret.as_ref().unwrap()
))
.replace(['\n', ' '], "");
map.insert(
header::AUTHORIZATION,
HeaderValue::from_str(&format!("Basic {value}"))?,
Expand Down

0 comments on commit 521fdbb

Please sign in to comment.