This repository was archived by the owner on Sep 10, 2024. It is now read-only.
File tree 2 files changed +11
-2
lines changed
handlers/src/upstream_oauth2
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- use std:: { ops :: Deref , collections :: BTreeMap } ;
15
+ use std:: { collections :: BTreeMap , ops :: Deref } ;
16
16
17
17
use async_trait:: async_trait;
18
18
use mas_iana:: { jose:: JsonWebSignatureAlg , oauth:: OAuthClientAuthenticationMethod } ;
Original file line number Diff line number Diff line change @@ -107,12 +107,21 @@ pub(crate) async fn get(
107
107
} ;
108
108
109
109
// Build an authorization request for it
110
- let ( url, data) = mas_oidc_client:: requests:: authorization_code:: build_authorization_url (
110
+ let ( mut url, data) = mas_oidc_client:: requests:: authorization_code:: build_authorization_url (
111
111
lazy_metadata. authorization_endpoint ( ) . await ?. clone ( ) ,
112
112
data,
113
113
& mut rng,
114
114
) ?;
115
115
116
+ // We do that in a block because params borrows url mutably
117
+ {
118
+ // Add any additional parameters to the query
119
+ let mut params = url. query_pairs_mut ( ) ;
120
+ for ( key, value) in & provider. additional_authorization_parameters {
121
+ params. append_pair ( key, value) ;
122
+ }
123
+ }
124
+
116
125
let session = repo
117
126
. upstream_oauth_session ( )
118
127
. add (
You can’t perform that action at this time.
0 commit comments