1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

Remove some unnecessary dependencies

This commit is contained in:
Quentin Gliech
2022-04-08 09:10:17 +02:00
parent 19f6cf851a
commit a3f1a880aa
6 changed files with 12 additions and 78 deletions

View File

@ -10,7 +10,7 @@ async-trait = "0.1.53"
axum = { version = "0.5.1", features = ["headers"] }
bincode = "1.3.3"
chrono = "0.4.19"
cookie = { version = "0.16.0", features = ["signed", "private", "percent-encode"] }
cookie = { version = "0.16.0", features = ["private", "percent-encode"] }
data-encoding = "2.3.2"
futures-util = "0.3.21"
headers = "0.3.7"

View File

@ -8,7 +8,7 @@ license = "Apache-2.0"
[dependencies]
tokio = { version = "1.17.0", features = ["full"] }
futures = "0.3.21"
anyhow = { version = "1.0.56", features = ["backtrace"] }
anyhow = "1.0.56"
clap = { version = "3.1.8", features = ["derive"] }
dotenv = "0.15.0"
schemars = { version = "0.8.8", features = ["url", "chrono"] }
@ -21,8 +21,6 @@ argon2 = { version = "0.4.0", features = ["password-hash"] }
reqwest = { version = "0.11.10", features = ["rustls-tls"], default-features = false, optional = true }
watchman_client = "0.7.2"
atty = "0.2.14"
rand = "0.8.5"
data-encoding = "2.3.2"
tracing = "0.1.32"
tracing-appender = "0.2.2"

View File

@ -14,7 +14,6 @@
use argon2::Argon2;
use clap::Parser;
use data_encoding::BASE64;
use mas_config::{DatabaseConfig, RootConfig};
use mas_storage::{
oauth2::client::{insert_client_from_config, lookup_client_by_client_id, truncate_clients},
@ -117,14 +116,7 @@ impl Options {
// TODO: should be moved somewhere else
let encrypted_client_secret = client_secret
.map(|client_secret| {
let nonce: [u8; 12] = rand::random();
let message = encrypter.encrypt(&nonce, client_secret.as_bytes())?;
let concat = [&nonce[..], &message[..]].concat();
let res = BASE64.encode(&concat);
anyhow::Ok(res)
})
.map(|client_secret| encrypter.encryt_to_string(client_secret.as_bytes()))
.transpose()?;
insert_client_from_config(

View File

@ -29,7 +29,6 @@ rsa = "0.6.0-pre"
p256 = { version = "0.10.1", features = ["ecdsa", "pem", "pkcs8"] }
pkcs8 = { version = "0.8.0", features = ["pem"] }
chacha20poly1305 = { version = "0.10.0-pre", features = ["std"] }
elliptic-curve = { version = "0.11.12", features = ["pem", "pkcs8"] }
pem-rfc7468 = "0.5.1"
cookie = { version = "0.16.0", features = ["private", "key-expansion"] }
data-encoding = "2.3.2"

View File

@ -12,12 +12,11 @@ futures-util = "0.3.21"
http = "0.2.6"
http-body = "0.4.4"
hyper = "0.14.18"
hyper-rustls = { version = "0.23.0", features = ["http1", "http2"] }
hyper-rustls = { version = "0.23.0", features = ["http1", "http2", "rustls-native-certs"], default-features = false }
once_cell = "1.10.0"
opentelemetry = "0.17.0"
opentelemetry-http = "0.6.0"
opentelemetry-semantic-conventions = "0.9.0"
pin-project-lite = "0.2.8"
rustls = "0.20.4"
serde = "1.0.136"
serde_json = "1.0.79"