You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Fix the authorization grant template
It previously relied on the client being in the authorization grant, which is not the case anymore. This commit also adds a test to ensure we're not breaking this template in the future.
This commit is contained in:
@@ -341,6 +341,7 @@ pub(crate) async fn get(
|
||||
rng,
|
||||
clock,
|
||||
grant,
|
||||
client,
|
||||
user_session,
|
||||
&policy_factory,
|
||||
repo,
|
||||
@@ -372,10 +373,7 @@ pub(crate) async fn get(
|
||||
Err(GrantCompletionError::Internal(e)) => {
|
||||
return Err(RouteError::Internal(e))
|
||||
}
|
||||
Err(
|
||||
e @ (GrantCompletionError::NotPending
|
||||
| GrantCompletionError::NoSuchClient),
|
||||
) => {
|
||||
Err(e @ GrantCompletionError::NotPending) => {
|
||||
// This should never happen
|
||||
return Err(RouteError::Internal(Box::new(e)));
|
||||
}
|
||||
@@ -388,6 +386,7 @@ pub(crate) async fn get(
|
||||
rng,
|
||||
clock,
|
||||
grant,
|
||||
client,
|
||||
user_session,
|
||||
&policy_factory,
|
||||
repo,
|
||||
@@ -413,10 +412,7 @@ pub(crate) async fn get(
|
||||
Err(GrantCompletionError::Internal(e)) => {
|
||||
return Err(RouteError::Internal(e))
|
||||
}
|
||||
Err(
|
||||
e @ (GrantCompletionError::NotPending
|
||||
| GrantCompletionError::NoSuchClient),
|
||||
) => {
|
||||
Err(e @ GrantCompletionError::NotPending) => {
|
||||
// This should never happen
|
||||
return Err(RouteError::Internal(Box::new(e)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user