You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
Put code challenge methods in AuthorizationRequestData
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
committed by
Quentin Gliech
parent
dbdeea4a10
commit
bbd0956f2d
@ -86,17 +86,20 @@ pub(crate) async fn get(
|
||||
|
||||
let redirect_uri = url_builder.upstream_oauth_callback(provider.id);
|
||||
|
||||
let data = AuthorizationRequestData::new(
|
||||
let mut data = AuthorizationRequestData::new(
|
||||
provider.client_id.clone(),
|
||||
provider.scope.clone(),
|
||||
redirect_uri,
|
||||
);
|
||||
|
||||
if let Some(methods) = metadata.code_challenge_methods_supported.clone() {
|
||||
data = data.with_code_challenge_methods_supported(methods);
|
||||
}
|
||||
|
||||
// Build an authorization request for it
|
||||
let (url, data) = mas_oidc_client::requests::authorization_code::build_authorization_url(
|
||||
metadata.authorization_endpoint().clone(),
|
||||
data,
|
||||
metadata.code_challenge_methods_supported.as_deref(),
|
||||
&mut rng,
|
||||
)?;
|
||||
|
||||
|
Reference in New Issue
Block a user