You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
Bump the latest axum rc
This commit is contained in:
@ -7,8 +7,8 @@ license = "Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1.58"
|
||||
axum = { version = "0.6.0-rc.2", features = ["headers"] }
|
||||
axum-extra = { version = "0.4.0-rc.1", features = ["cookie-private"] }
|
||||
axum = { version = "0.6.0-rc.4", features = ["headers"] }
|
||||
axum-extra = { version = "0.4.0-rc.2", features = ["cookie-private"] }
|
||||
bincode = "1.3.3"
|
||||
chrono = "0.4.23"
|
||||
data-encoding = "2.3.2"
|
||||
@ -21,7 +21,7 @@ rand = "0.8.5"
|
||||
serde = "1.0.147"
|
||||
serde_with = "2.1.0"
|
||||
serde_urlencoded = "0.7.1"
|
||||
serde_json = "1.0.87"
|
||||
serde_json = "1.0.88"
|
||||
sqlx = "0.6.2"
|
||||
thiserror = "1.0.37"
|
||||
tokio = "1.21.2"
|
||||
|
@ -18,7 +18,7 @@ use async_trait::async_trait;
|
||||
use axum::{
|
||||
body::HttpBody,
|
||||
extract::{
|
||||
rejection::{FailedToDeserializeQueryString, FormRejection, TypedHeaderRejectionReason},
|
||||
rejection::{FailedToDeserializeForm, FormRejection, TypedHeaderRejectionReason},
|
||||
Form, FromRequest, FromRequestParts, TypedHeader,
|
||||
},
|
||||
response::IntoResponse,
|
||||
@ -217,7 +217,7 @@ pub struct ClientAuthorization<F = ()> {
|
||||
#[derive(Debug)]
|
||||
pub enum ClientAuthorizationError {
|
||||
InvalidHeader,
|
||||
BadForm(FailedToDeserializeQueryString),
|
||||
BadForm(FailedToDeserializeForm),
|
||||
ClientIdMismatch { credential: String, form: String },
|
||||
UnsupportedClientAssertion { client_assertion_type: String },
|
||||
MissingCredentials,
|
||||
@ -284,7 +284,7 @@ where
|
||||
// If it is not a form, continue
|
||||
Err(FormRejection::InvalidFormContentType(_err)) => (None, None, None, None, None),
|
||||
// If the form could not be read, return a Bad Request error
|
||||
Err(FormRejection::FailedToDeserializeQueryString(err)) => {
|
||||
Err(FormRejection::FailedToDeserializeForm(err)) => {
|
||||
return Err(ClientAuthorizationError::BadForm(err))
|
||||
}
|
||||
// Other errors (body read twice, byte stream broke) return an internal error
|
||||
|
@ -18,7 +18,7 @@ use async_trait::async_trait;
|
||||
use axum::{
|
||||
body::HttpBody,
|
||||
extract::{
|
||||
rejection::{FailedToDeserializeQueryString, FormRejection, TypedHeaderRejectionReason},
|
||||
rejection::{FailedToDeserializeForm, FormRejection, TypedHeaderRejectionReason},
|
||||
Form, FromRequest, FromRequestParts, TypedHeader,
|
||||
},
|
||||
response::{IntoResponse, Response},
|
||||
@ -109,7 +109,7 @@ impl<F: Send> UserAuthorization<F> {
|
||||
pub enum UserAuthorizationError {
|
||||
InvalidHeader,
|
||||
TokenInFormAndHeader,
|
||||
BadForm(FailedToDeserializeQueryString),
|
||||
BadForm(FailedToDeserializeForm),
|
||||
InternalError(Box<dyn Error>),
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ where
|
||||
// If it is not a form, continue
|
||||
Err(FormRejection::InvalidFormContentType(_err)) => (None, None),
|
||||
// If the form could not be read, return a Bad Request error
|
||||
Err(FormRejection::FailedToDeserializeQueryString(err)) => {
|
||||
Err(FormRejection::FailedToDeserializeForm(err)) => {
|
||||
return Err(UserAuthorizationError::BadForm(err))
|
||||
}
|
||||
// Other errors (body read twice, byte stream broke) return an internal error
|
||||
|
Reference in New Issue
Block a user