Skip to content

Commit d4fdc91

Browse files
committed
Delete more unused oidc-client code
1 parent 420b8da commit d4fdc91

File tree

15 files changed

+61
-656
lines changed

15 files changed

+61
-656
lines changed

Cargo.lock

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/handlers/src/upstream_oauth2/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::string::FromUtf8Error;
99
use mas_data_model::UpstreamOAuthProvider;
1010
use mas_iana::{jose::JsonWebSignatureAlg, oauth::OAuthClientAuthenticationMethod};
1111
use mas_keystore::{DecryptError, Encrypter, Keystore};
12-
use mas_oidc_client::types::client_credentials::{ClientCredentials, JwtSigningMethod};
12+
use mas_oidc_client::types::client_credentials::ClientCredentials;
1313
use thiserror::Error;
1414
use url::Url;
1515

@@ -84,7 +84,7 @@ fn client_credentials_for_provider(
8484
},
8585
OAuthClientAuthenticationMethod::PrivateKeyJwt => ClientCredentials::PrivateKeyJwt {
8686
client_id,
87-
jwt_signing_method: JwtSigningMethod::Keystore(keystore.clone()),
87+
keystore: keystore.clone(),
8888
signing_algorithm: provider
8989
.token_endpoint_signing_alg
9090
.clone()

crates/oidc-client/Cargo.toml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,10 @@ repository.workspace = true
1111
[lints]
1212
workspace = true
1313

14-
[features]
15-
default = ["keystore"]
16-
keystore = ["dep:mas-keystore"]
17-
1814
[dependencies]
1915
base64ct = { version = "1.6.0", features = ["std"] }
20-
bytes.workspace = true
2116
chrono.workspace = true
2217
form_urlencoded = "1.2.1"
23-
futures-util = "0.3.31"
2418
headers.workspace = true
2519
http.workspace = true
2620
language-tags = "0.3.2"
@@ -30,22 +24,19 @@ reqwest.workspace = true
3024
serde.workspace = true
3125
serde_json.workspace = true
3226
serde_urlencoded = "0.7.1"
33-
serde_with = "3.11.0"
3427
thiserror.workspace = true
35-
tower.workspace = true
3628
tracing.workspace = true
3729
url.workspace = true
3830

3931
mas-http.workspace = true
4032
mas-iana.workspace = true
4133
mas-jose.workspace = true
42-
mas-keystore = { workspace = true, optional = true }
34+
mas-keystore.workspace = true
4335
oauth2-types.workspace = true
4436

4537
[dev-dependencies]
4638
assert_matches = "1.5.0"
4739
bitflags = "2.6.0"
48-
mas-keystore.workspace = true
4940
rand_chacha = "0.3.1"
5041
tokio.workspace = true
5142
wiremock = "0.6.2"

crates/oidc-client/src/error.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use mas_jose::{
1313
};
1414
use oauth2_types::{oidc::ProviderMetadataVerificationError, pkce::CodeChallengeError};
1515
use thiserror::Error;
16-
pub use tower::BoxError;
1716

1817
/// All possible errors when using this crate.
1918
#[derive(Debug, Error)]
@@ -225,8 +224,4 @@ pub enum CredentialsError {
225224
/// An error occurred when signing the JWT.
226225
#[error(transparent)]
227226
JwtSignature(#[from] JwtSignatureError),
228-
229-
/// An error occurred with a custom signing method.
230-
#[error(transparent)]
231-
Custom(BoxError),
232227
}

crates/oidc-client/src/requests/authorization_code.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use rand::{
2929
Rng,
3030
};
3131
use serde::Serialize;
32-
use serde_with::skip_serializing_none;
3332
use url::Url;
3433

3534
use super::jose::JwtVerificationData;
@@ -194,12 +193,12 @@ pub struct AuthorizationValidationData {
194193
pub code_challenge_verifier: Option<String>,
195194
}
196195

197-
#[skip_serializing_none]
198196
#[derive(Clone, Serialize)]
199197
struct FullAuthorizationRequest {
200198
#[serde(flatten)]
201199
inner: AuthorizationRequest,
202-
#[serde(flatten)]
200+
201+
#[serde(flatten, skip_serializing_if = "Option::is_none")]
203202
pkce: Option<pkce::AuthorizationRequest>,
204203
}
205204

crates/oidc-client/src/requests/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ pub mod client_credentials;
1111
pub mod discovery;
1212
pub mod jose;
1313
pub mod refresh_token;
14-
pub mod rp_initiated_logout;
1514
pub mod token;
1615
pub mod userinfo;

crates/oidc-client/src/requests/rp_initiated_logout.rs

Lines changed: 0 additions & 126 deletions
This file was deleted.

0 commit comments

Comments
 (0)