1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

Save whether the client supports the device code grant in the database

This commit is contained in:
Quentin Gliech
2023-12-08 17:21:34 +01:00
parent 1c62543220
commit 31936bcc00
17 changed files with 458 additions and 74 deletions

View File

@@ -625,10 +625,10 @@ async fn device_code_grant(
site_config: &SiteConfig,
mut repo: BoxRepository,
) -> Result<(AccessTokenResponse, BoxRepository), RouteError> {
// TODO: Check that the client is allowed to use this grant type
//if !client.grant_types.contains(&GrantType::DeviceCode) {
// return Err(RouteError::UnauthorizedClient);
//}
// Check that the client is allowed to use this grant type
if !client.grant_types.contains(&GrantType::DeviceCode) {
return Err(RouteError::UnauthorizedClient);
}
let grant = repo
.oauth2_device_code_grant()