From b9edbda5e169b09e18ab8bb6b51ac15faed810a3 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Tue, 5 Sep 2023 11:49:57 +0200 Subject: [PATCH] Advertise the client_credentials grant in the discovery document --- crates/handlers/src/oauth2/discovery.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/handlers/src/oauth2/discovery.rs b/crates/handlers/src/oauth2/discovery.rs index 9d8eff64..ba4b6283 100644 --- a/crates/handlers/src/oauth2/discovery.rs +++ b/crates/handlers/src/oauth2/discovery.rs @@ -71,7 +71,11 @@ pub(crate) async fn get( ResponseMode::Fragment, ]); - let grant_types_supported = Some(vec![GrantType::AuthorizationCode, GrantType::RefreshToken]); + let grant_types_supported = Some(vec![ + GrantType::AuthorizationCode, + GrantType::RefreshToken, + GrantType::ClientCredentials, + ]); let token_endpoint_auth_methods_supported = client_auth_methods_supported.clone(); let token_endpoint_auth_signing_alg_values_supported =