@@ -14,7 +14,7 @@ use std::sync::{Arc, Mutex};
1414
1515use crate :: { OAuth2Client , OAuth2Error , OAuth2Response } ;
1616
17- const JWKS_URL : & ' static str = "https://login.microsoftonline.com/common/discovery/keys" ;
17+ const JWKS_URL : & str = "https://login.microsoftonline.com/common/discovery/keys" ;
1818
1919#[ derive( Debug , Deserialize , Serialize , Clone ) ]
2020struct AzureADTokenResponseExtra {
@@ -43,18 +43,17 @@ pub struct AzureADOAuth2Client {
4343 client_id : String ,
4444 jwks : Arc < Mutex < JwkSet > > ,
4545 use_refresh_token : bool ,
46- tenant_id : String , // Add tenant ID
46+ _tenant_id : String ,
4747}
4848
4949impl AzureADOAuth2Client {
5050 fn get_jwk ( & self , kid : & str ) -> Option < jsonwebtoken:: jwk:: Jwk > {
5151 let jwks = self . jwks . lock ( ) . expect ( "mutex should not be poissoned" ) ;
52- jwks. find ( & kid) . cloned ( )
52+ jwks. find ( kid) . cloned ( )
5353 }
5454}
5555
5656async fn fetch_jwks ( reqwest_client : & reqwest:: Client ) -> Result < JwkSet , OAuth2Error > {
57- eprintln ! ( "Refreshing JwkSet" ) ;
5857 let jwks = reqwest_client
5958 . get ( JWKS_URL )
6059 . send ( )
@@ -148,7 +147,7 @@ pub async fn build_oauth2_state_azure_ad(
148147 jwks,
149148 client_id : client_id. to_string ( ) ,
150149 use_refresh_token,
151- tenant_id : tenant_id. to_string ( ) , // Store tenant ID
150+ _tenant_id : tenant_id. to_string ( ) , // Store tenant ID
152151 } )
153152}
154153
0 commit comments