diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/auth/openid.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/auth/openid.rs b/src/modules/auth/openid.rs index a8d9d6e..7253ba8 100644 --- a/src/modules/auth/openid.rs +++ b/src/modules/auth/openid.rs @@ -42,6 +42,7 @@ pub struct OpenIDAuth { client_id: String, authorize_endpoint: String, token_endpoint: String, + scope: String, next: DynNode, } @@ -153,13 +154,14 @@ id_token={id_token:?}"# let redirect_uri = redirect_uri(&request)?.to_string(); let uri = format!( - "{}?client_id={}&redirect_uri={}&state={}_{}&code_challenge={}&code_challenge_method=S256&response_type=code&scope=openid magic", + "{}?client_id={}&redirect_uri={}&state={}_{}&code_challenge={}&code_challenge_method=S256&response_type=code&scope=openid {}", self.authorize_endpoint, utf8_percent_encode(&self.client_id, NON_ALPHANUMERIC), utf8_percent_encode(&redirect_uri, NON_ALPHANUMERIC), hex::encode(verif_cipher), utf8_percent_encode(&request.uri().to_string(), NON_ALPHANUMERIC), base64::engine::general_purpose::URL_SAFE.encode(chal).trim_end_matches("="), + utf8_percent_encode(&self.scope, NON_ALPHANUMERIC), ); info!("redirect {uri:?}"); let mut resp = |