@@ -3,7 +3,7 @@ use std::time::Duration;
33use forge_app:: { AuthStrategy , OAuthHttpProvider , StrategyFactory } ;
44use forge_domain:: {
55 ApiKey , ApiKeyRequest , AuthContextRequest , AuthContextResponse , AuthCredential , CodeRequest ,
6- DeviceCodeRequest , OAuthConfig , OAuthTokenResponse , OAuthTokens , ProviderId , URLParam ,
6+ DeviceCodeRequest , OAuthConfig , OAuthTokenResponse , OAuthTokens , ProviderId , URLParamSpec ,
77} ;
88use google_cloud_auth:: credentials:: Builder ;
99use oauth2:: basic:: BasicClient ;
@@ -18,11 +18,11 @@ use crate::auth::util::*;
1818/// API Key Strategy - Simple static key authentication
1919pub struct ApiKeyStrategy {
2020 provider_id : ProviderId ,
21- required_params : Vec < URLParam > ,
21+ required_params : Vec < URLParamSpec > ,
2222}
2323
2424impl ApiKeyStrategy {
25- pub fn new ( provider_id : ProviderId , required_params : Vec < URLParam > ) -> Self {
25+ pub fn new ( provider_id : ProviderId , required_params : Vec < URLParamSpec > ) -> Self {
2626 Self { provider_id, required_params }
2727 }
2828}
@@ -348,11 +348,11 @@ impl AuthStrategy for OAuthWithApiKeyStrategy {
348348/// Uses Google Cloud SDK's ADC mechanism with automatic token refresh
349349pub struct GoogleAdcStrategy {
350350 provider_id : ProviderId ,
351- required_params : Vec < URLParam > ,
351+ required_params : Vec < URLParamSpec > ,
352352}
353353
354354impl GoogleAdcStrategy {
355- pub fn new ( provider_id : ProviderId , required_params : Vec < URLParam > ) -> Self {
355+ pub fn new ( provider_id : ProviderId , required_params : Vec < URLParamSpec > ) -> Self {
356356 Self { provider_id, required_params }
357357 }
358358}
@@ -1036,7 +1036,7 @@ impl StrategyFactory for ForgeAuthStrategyFactory {
10361036 & self ,
10371037 provider_id : ProviderId ,
10381038 auth_method : forge_domain:: AuthMethod ,
1039- required_params : Vec < URLParam > ,
1039+ required_params : Vec < URLParamSpec > ,
10401040 ) -> anyhow:: Result < Self :: Strategy > {
10411041 match auth_method {
10421042 forge_domain:: AuthMethod :: ApiKey => Ok ( AnyAuthStrategy :: ApiKey ( ApiKeyStrategy :: new (
@@ -1093,6 +1093,7 @@ impl StrategyFactory for ForgeAuthStrategyFactory {
10931093mod tests {
10941094 use std:: collections:: HashMap ;
10951095
1096+ use forge_domain:: URLParam ;
10961097 use pretty_assertions:: assert_eq;
10971098
10981099 use super :: * ;
0 commit comments