client-api: Fix string representation of CodeChallengeMethod

Signed-off-by: strawberry <june@girlboss.ceo>
This commit is contained in:
=?UTF-8?q?K=C3=A9vin=20Commaille?= 2025-02-16 17:28:15 -05:00 committed by strawberry
parent 674d54381f
commit b9d9a2abcc
No known key found for this signature in database
2 changed files with 2 additions and 3 deletions

View file

@ -294,7 +294,6 @@ pub mod msc2965 {
/// The code challenge method to use at the authorization endpoint.
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
#[derive(Clone, StringEnum, PartialEqAsRefStr, Eq, PartialOrdAsRefStr, OrdAsRefStr)]
#[ruma_enum(rename_all = "lowercase")]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub enum CodeChallengeMethod {
/// Use a SHA-256, base64url-encoded code challenge ([RFC7636]).
@ -392,7 +391,7 @@ mod tests {
"response_modes_supported": ["query", "fragment"],
"grant_types_supported": ["authorization_code", "refresh_token"],
"revocation_endpoint": "https://server.local/revoke",
"code_challenge_methods_supported": ["s256"],
"code_challenge_methods_supported": ["S256"],
"account_management_uri": "https://server.local/account",
"account_management_actions_supported": [
"org.matrix.profile",

View file

@ -85,7 +85,7 @@ impl<'de> Deserialize<'de> for AuthorizationServerMetadata {
// Require `S256` in `code_challenge_methods_supported`.
if !code_challenge_methods_supported.contains(&CodeChallengeMethod::S256) {
return Err(de::Error::custom(
"missing value `s256` in `code_challenge_methods_supported`",
"missing value `S256` in `code_challenge_methods_supported`",
));
}