You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-09 04:22:45 +03:00
Remove unnecessary dependencies
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use futures_util::future::Either;
|
||||
use mas_iana::jose::{JsonWebKeyType, JsonWebKeyUse, JsonWebSignatureAlg};
|
||||
|
||||
use crate::JsonWebSignatureHeader;
|
||||
@@ -96,40 +95,6 @@ pub trait Constrainable {
|
||||
fn kty(&self) -> JsonWebKeyType;
|
||||
}
|
||||
|
||||
impl<L, R> Constrainable for Either<L, R>
|
||||
where
|
||||
L: Constrainable,
|
||||
R: Constrainable,
|
||||
{
|
||||
fn algs(&self) -> Option<Vec<JsonWebSignatureAlg>> {
|
||||
match self {
|
||||
Either::Left(l) => l.algs(),
|
||||
Either::Right(r) => r.algs(),
|
||||
}
|
||||
}
|
||||
|
||||
fn kid(&self) -> Option<&str> {
|
||||
match self {
|
||||
Either::Left(l) => l.kid(),
|
||||
Either::Right(r) => r.kid(),
|
||||
}
|
||||
}
|
||||
|
||||
fn use_(&self) -> Option<JsonWebKeyUse> {
|
||||
match self {
|
||||
Either::Left(l) => l.use_(),
|
||||
Either::Right(r) => r.use_(),
|
||||
}
|
||||
}
|
||||
|
||||
fn kty(&self) -> JsonWebKeyType {
|
||||
match self {
|
||||
Either::Left(l) => l.kty(),
|
||||
Either::Right(r) => r.kty(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Constraint<'a> {
|
||||
fn decide<T: Constrainable>(&self, constrainable: &T) -> ConstraintDecision {
|
||||
match self {
|
||||
|
@@ -26,8 +26,6 @@ mod keystore;
|
||||
pub mod signer;
|
||||
pub mod verifier;
|
||||
|
||||
pub use futures_util::future::Either;
|
||||
|
||||
pub use self::{
|
||||
jwt::{DecodedJsonWebToken, JsonWebSignatureHeader, JsonWebTokenParts, Jwt, JwtSignatureError},
|
||||
keystore::{SigningKeystore, StaticKeystore, VerifyingKeystore},
|
||||
|
Reference in New Issue
Block a user